Download the PHP package permaxis/laravel-crudgenerator without Composer
On this page you can find all versions of the php package permaxis/laravel-crudgenerator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download permaxis/laravel-crudgenerator
More information about permaxis/laravel-crudgenerator
Files in permaxis/laravel-crudgenerator
Package laravel-crudgenerator
Short Description Generate a crud (create read update delete) interface based on model laravel
License MIT
Informations about the package laravel-crudgenerator
laravel-crudgenerator
About Laravel CrudGenerator
Laravel CrudGenerator is a package that install in your laravel project a simple crud (Create Read Update Delete) interface to manage your model. The interface is based on Bootstrap 4 Theme
Versions
Laravel | laravel-crud-generator |
---|---|
6.0 | ^1.0 |
Demo
You can see a demo at this address url : https://laravelcrudgenerator.permaxis.fr/
- login: [email protected]
- password: demolaravel
1. Install package
composer require permaxis/laravel-crudgenerator
This package will also install a package dependency named "permaxis/laravel-core", a toolbox libraries for laravel
- Register your package in your config/app.php file, add the package to your service provider
\Permaxis\Laravel\CrudGenerator\CrudGeneratorServiceProvider::class,
2. Generates crud based on Model
For example, you have a model named Article located in app\Models folder. it full namespace is App\Models\Article
Execute the command below:
php artisan permaxis:make:crudgenerator --m="\App\Models\Article" --c=ArticleController --ov --oc --rn=bo
It generates a controller named "ArticleController" in your app/Http/Controllers folder
It generates a folder named "articles" in your resource views folder that contains these views:
index, create, edit, delete, form, search
Here are the listed options for the package: `
3. Create Routes for crud interface
For accessing to the crud interface via browser, you have to create routes:
Add this function to your app/Providers/RouteServiceProvider.php file
Call this method in your register method of your RouteServiceProvider class
It creates routes for resource articles. The crud interface is accessing at the url /backoffice/articles
Method | Uri | Route | Action Controller | Middleware |
---|---|---|---|---|
GET|HEAD | articles | bo.articles.index | App\Http\Controllers\ArticleController@index | web |
POST | articles | bo.articles.store | App\Http\Controllers\ArticleController@store | web |
DELETE | articles | bo.articles.destroy_entities | App\Http\Controllers\ArticleController@destroyEntities | web |
GET|HEAD | articles/create | bo.articles.create | App\Http\Controllers\ArticleController@create | web |
PUT | articles/{id} | bo.articles.update | App\Http\Controllers\ArticleController@update | web |
DELETE | articles/{id} | bo.articles.destroy | App\Http\Controllers\ArticleController@destroy | web |
GET|HEAD | articles/{id}/delete | bo.articles.delete | App\Http\Controllers\ArticleController@delete | web |
GET|HEAD | articles/{id}/edit | bo.articles.edit | App\Http\Controllers\ArticleController@edit | web |
GET|HEAD | articles/{id}/show | bo.articles.show | App\Http\Controllers\ArticleController@show | web |
4. Publish assets
php artisan vendor:publish --tag=permaxis_crudgenerator_assets
It publishes assets folder in your Resources folder : resources/vendor/permaxis/laravel-crugenerator/assets
The script "crudgenerator.js" asset is used by the crud interface.
Package assets resources/vendor/permaxis/laravel-crugenerator/assets/crudgenerator.js that you can publish to your public directory or use laravel mix and include it in your js/all.js
5. Publish layouts
Publish include folder in Resources views folder : resources/views/vendor/permaxis/laravel-crugenerator. It is used for common files
php artisan vendor:publish --tag=permaxis_crudgenerator_include
Publish layouts folder in Resources views folder : resources/views/vendor/permaxis/laravel-crugenerator. The views for articles folder extend the layout "admin.blade.php"
php artisan vendor:publish --tag=permaxis_crudgenerator_layouts
You can override this layout or use your own layout, but the assets below are required
- Jquery : https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.2.2/jquery.form.min.js
- Bootstrap 4: https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js
- fontawesome: https://use.fontawesome.com/releases/v5.14.0/css/all.css
- Package assets resources/vendor/permaxis/laravel-crugenerator/assets/crudgenerator.js that you can publish to your public directory or use laravel mix and include it in your js/all.js
5. Onine Demo
You can see a demo at this address url : https://laravelcrudgenerator.permaxis.fr/
- login: [email protected]
- password: demolaravel