laravel-table-admin
, (*1)
Laravel-Table-Admin Simple CRUD package for Laravel 4, (*2)
, (*3)
, (*4)
demo site, (*5)
blog (Japanese), (*6)
Installation
First, add dependency in composer.json, (*7)
$ composer require "shin1x1/laravel-table-admin" "dev-master"
or, (*8)
{
"require": {
"shin1x1/laravel-table-admin": "0.1.*"
}
}
Execute composer install or update, (*9)
$ composer install or update
Next, add ServiceProvider and Facade in app/config/app.php
, (*10)
'providers' => [
// ....
'Shin1x1\LaravelTableAdmin\TAbleAdminServiceProvider`
],
'aliases' => [
// ....
'TableAdmin' => 'Shin1x1\LaravelTableAdmin\TableAdminFacade',
],
Finally, you specify table name that to be enable CRUD app/routes.php
, (*11)
TableAdmin::route([
'classes',
'nationalities',
'riders',
]);
Done!, (*12)
If you will open http://localhost/crud/{TABLE}
in browser, you can access CRUD., (*13)
Customization
View template files
If you run the below command then view template files will be publish to app/views/packages/shin1x1/laravel-table-admin/
., (*14)
$ php artisan view:publish shin1x1/laravel-table-admin
Views published for package: shin1x1/laravel-table-admin
Published view template files include 3 files.base.blade.php
is base layout file.form.blade.php
is create and edit form page.index.blade.php
is index page., (*15)
$ ls app/views/packages/shin1x1/laravel-table-admin/
base.blade.php form.blade.php index.blade.php
Example
Example using this package is below repo., (*16)
https://github.com/shin1x1/laravel-table-admin-example, (*17)