Download the PHP package amamarul/boiler-plate-commands without Composer
On this page you can find all versions of the php package amamarul/boiler-plate-commands. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amamarul/boiler-plate-commands
More information about amamarul/boiler-plate-commands
Files in amamarul/boiler-plate-commands
Package boiler-plate-commands
Short Description Package to generate automatic cruds for Laravel BoilerPlate Apps
License MIT
Informations about the package boiler-plate-commands
BoilerPlateCommands
Package to generate automatic cruds for Laravel BoilerPlate Apps [Laravel 5 Boilerplate]
The amamarul:crud make:
1 - Model
2 - Model Trait Attribute
3 - Model Trait Relationship
4 - Model Trait Scope
5 - Form Request
6 - Controller
7 - Datatable as Service for Controller
8 - Routes
9 - Breadcrumbs
Install Boilerplate
Duplicate .env.example and rename to .env
Set Database in .env
Install Package (Laravel)
Via Composer
Require Datatables Package
Service Provider
Configuration and Assets
Add the following to the AppServiceProvider in the register function:
app/Providers/AppServiceProvider.php
The register function should look like this
Publish the views
Usage
You need the tables migrated
create migration
Migrate
Make the Crud
Run the following commands
amamarul:crud {name} {tabla} {seccion} {grupo?}
- name: Is the Model Name
- tabla: Is the table name
- seccion: can be 'Backend', 'Frontend' or the section you want
- grupo: if you want to group different Models and Controllers like sub sections. this is optional
This is an example for Backend and the group 'Products'. Then you can to add another model/controller in that group
-
The result in console will be
- Run php artisan serve
Now you can go to http://localhost:8000/admin/products/product and you will show the datatable.
Go to app/Http/Controllers/Backend/Products/DataTables/ProductDataTable.php and uncomment the fields you want to show in the datatable in the getColumns() function (the last function), by default you will see only 'id', 'created_at' and 'updated_at'.
Contributing
Contributions are welcome and will be fully credited.
I accept contributions via Pull Requests
Credits
License
The MIT License (MIT). Please see License File for more information.