dev-master
9999999-dev
MIT
The Requires
by Sergio Vilar
v0.2.2
0.2.2.0
MIT
The Requires
by Sergio Vilar
v0.2.1
0.2.1.0
MIT
The Requires
by Sergio Vilar
V0.2.0
0.2.0.0
MIT
The Requires
by Sergio Vilar
v0.1.0
0.1.0.0
MIT
The Requires
by Sergio Vilar
Wallogit.com
2017 © Pedro Peláez
Create CRUDs (Create, Read, Update, Delete) for your models in Laravel 5 and Lumen., (*1)
Install via composer:, (*2)
composer require sergiovilar/laravel-crud
Copy the contents of the views folder to resources/views., (*3)
Add this line to the bootstrap/app.php file before the return $app;:, (*4)
new AdminBootstrap('/app/Admin');
/app/Admin should be the folder where you'll put the CRUDs specification., (*5)
Add this line to your app/http/routes.php file:, (*6)
Admin::routes();
Add this line to the bootstrap/app.php file before the line containing $app->group(['namespace' => 'App\Http\Controllers']):, (*7)
new AdminBootstrap('/app/Admin', $app);
/app/Admin should be the folder where you'll put the CRUDs specification., (*8)
Add this line to your app/http/routes.php file:, (*9)
Admin::routes($app);
Create a file with the name of the model you want to create the CRUD:, (*10)
touch app/Admin/Car.php
Car.php:, (*11)
Admin::model('Car')
->middleware('admin') // Specify an HTTP Middleware to check if the user is logged
->title('Cars') // Title of the page
->columns(function(){ // Columns to list the items in this model
Column::string('model', 'Model'); // field, label
Column::integer('year', 'Year');
})->form(function(){
FormItem::text('model', 'Model'); // field, label
FormItem::number('year', 'Year');
});
MIT
MIT
MIT
MIT
MIT