PHPackages                             ramosmerino/laravel-5-rest-api-scaffold - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ramosmerino/laravel-5-rest-api-scaffold

ActiveLibrary[API Development](/categories/api)

ramosmerino/laravel-5-rest-api-scaffold
=======================================

Creates Migrations, Seeders, Factories, Tests, Models, Controllers and Resources with one command. Delete everything with another.

v0.1.2(8y ago)1118MITPHPPHP &gt;=5.6.0

Since Dec 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ramosmerino/Laravel-5-REST-API-Scaffold)[ Packagist](https://packagist.org/packages/ramosmerino/laravel-5-rest-api-scaffold)[ RSS](/packages/ramosmerino-laravel-5-rest-api-scaffold/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (5)Used By (0)

Laravel 5 REST API Scaffold
===========================

[](#laravel-5-rest-api-scaffold)

If you're familiar with [Laravel 5 Generators Extended](https://github.com/laracasts/Laravel-5-Generators-Extended), then this is basically the same thing but with only one command and some nice things.

Commands
--------

[](#commands)

- `scaffold:create --model  --schema` Creates Migration, Seeder, Factory, Test, Model, Controller and Resource.
- `scaffold:flush` Drop Tables, Views, Triggers and Procedures without touching the Grants.

⚠️ Only scaffold:create is full operative. Don't use scaffold:flush if you don't understand the code.

Usage on Laravel 5.5
--------------------

[](#usage-on-laravel-55)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require ramosmerino/laravel-5-rest-api-scaffold --dev

```

### Step 2: Run Artisan

[](#step-2-run-artisan)

Run `php artisan` from the console, and you'll see the new commands in the `scaffold:*` namespace section.

Example
-------

[](#example)

```
php artisan scaffold:create --model=Dog --schema="name:string,age:tinyinteger"

```

In a fresh Laravel installation should return:

```
Model created successfully.
Controller created successfully.
Migration created successfully.
Seeder created successfully.
Resource created successfully.
Factory created successfully.
Test created successfully.

```

app\\Dog.php

```
