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
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

Subheader Image

First add the package via composer

$ composer require morganrowse/laravelcrud dev-master

Use dev-master as I currently don't push tags

Usage

Subheader Image

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');
...

Subheader Image

Related Packages

amptech/laravel-blade-scaffold

Generador automático de vistas CRUD Blade para Laravel con componentes reutiliza...

17 0
theorem/fat-crud

Fully automated generation of boostrap CRUD pages from database tables.

28 4
mosweed/laravel-auto-crud

Complete CRUD scaffolding generator for Laravel 12 with API, Blade views, Livewi...

27 0
san-kumar/laravel-crud

Laravel CRUD generator: Generate CRUD for any db table with the crud:generate co...

5,331 57