morganrowse/laravelcrud
Artisan command to generate routing, views and controllers from a database table
89
2
| Install | |
|---|---|
composer require morganrowse/laravelcrud |
|
| Latest Version: | 0.0.15 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Jul 30, 2018 |
| Links: | GitHub · Packagist |
Maintainer: morganrowse
Laravel CRUD
This composer package adds artisan commands which create Models, Views, Controllers and Request Validation for crud operation based off of a database table schema.
Installation

First add the package via composer
$ composer require morganrowse/laravelcrud dev-master
Use dev-master as I currently don't push tags
Usage

First have your database setup as desired following laravel naming convention (such as a table called posts).
Next run the command via artisan
$ php artisan make:crud posts
This will create:
app
│ Post.php
└───Http
│ └───Controllers
│ │ │ PostController.php
│ | └───View
│ │ │ | PostController.php
│ └───Requests
│ │ └───Post
│ │ │ │ DestroyPost.php
│ │ │ │ StorePost.php
│ │ │ │ UpdatePost.php
│ └───Resources
│ │ │ PostResource.php
resources
└───views
│ └───posts
│ │ │ create.blade.php
│ │ │ edit.blade.php
│ │ │ index.blade.php
│ │ │ show.blade.php
Now add the view routes to your web.php
...
Route::resource('posts','View\\PostController');
...
Finally add the api routes to your api.php
...
Route::apiResource('posts','PostController');
...

Related Packages
san-kumar/laravel-crud
Laravel CRUD generator: Generate CRUD for any db table with the crud:generate co...
6,354
57
Version History
| Version | Released | Laravel | License |
|---|---|---|---|
| 0.0.15 | ^5.4 | MIT | |
| 0.0.14 | ^5.4 | MIT | |
| 0.0.13 | ^5.4 | MIT | |
| 0.0.12 | ^5.4 | MIT | |
| 0.0.11 | 5.4.* | MIT | |
| 0.0.10 | 5.4.* | MIT | |
| 0.0.9 | 5.4.* | MIT | |
| 0.0.8 | 5.4.* | MIT | |
| 0.0.7 | MIT | ||
| 0.0.6 | MIT | ||
| 0.0.5 | 5.4.* | MIT | |
| 0.0.4 | 5.4.* | MIT | |
| 0.0.3 | 5.4.* | MIT | |
| 0.0.2 | 5.4.* | MIT | |
| 0.0.1 | 5.4.* | MIT |