2017 © Pedro Peláez
 

library laravel-resource-api

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

image

iramgutierrez/laravel-resource-api

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  • Friday, November 11, 2016
  • by iramgutierrez
  • Repository
  • 2 Watchers
  • 4 Stars
  • 101 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Resource API Generator for Laravel 5.2

Software License, (*1)

Total Downloads, (*2)

Full resource generator for API RESTful,, (*3)

This package implements the layers pattern design, include:, (*4)

  • Entity
  • Controller
  • Manager
  • Validator
  • Repository
  • Migration
  • Route
  • Documentation (Require apidocjs installed)

Installation

Add the following line to your composer.json file:, (*5)

"iramgutierrez/laravel-resource-api": "1.0.*"

Run composer update to get the package., (*6)

Once composer has installed the package add this line of code to the providers array located in your config/app.php file:, (*7)

IramGutierrez\API\APIServiceProvider::class,

Add this line of code to the $commands protected array located in your app/Console/Kernel.php file:, (*8)

\IramGutierrez\API\ResourceAPI::class,

Migrations and Configuration Publishing

Run php artisan vendor:publish to publish this package configuration and migrations. Afterwards you can edit the file config/resource_api.php to set the namespace for the resources generated., (*9)

Run migration to create required tables, (*10)

php artisan migrate

Usage

Now, you should have available the Artisan command: create-resource-api and can be used like this:, (*11)

php artisan create-resource-api {Entity}

Example

Run, (*12)

php artisan create-resource-api Test

And, the command ask you for the table name:, (*13)

Table name [tests]:

namespace:, (*14)

Path name [API]:

prefix route:, (*15)

Prefix route []:

if do you want generate documentation:, (*16)

Generate documentation? (Require apidocjs) (yes/no) [yes]:

if do you want generate the migration file:, (*17)

Generate migration? (yes/no) [yes]:

if do you want run migration:, (*18)

Run migration? (yes/no) [yes]:

if do you want add the route resource in routes.php file:, (*19)

Add routes resource? (yes/no) [yes]:

and if do you want add some middleware:, (*20)

Middlewares or middleware groups (comma separated) []:

When the execution is finished, you should have available the following functional routes:, (*21)

Route Method Uses Action
/tests GET API\TestController@index Request all tests
/tests POST API\TestController@store Store a test
/tests/:id GET API\TestController@show Request a specific test
/tests/:id PUT API\TestController@update Update a specific test
/tests/:id DELETE API\TestController@destroy Delete a specific test

License

The Laravel Resource API package is released under the MIT License., (*22)

The Versions

11/11 2016

1.0.26

1.0.26.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

11/11 2016

1.0.25

1.0.25.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

11/11 2016

1.0.24

1.0.24.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

29/01 2016

1.0.23

1.0.23.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

29/01 2016

1.0.22

1.0.22.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

29/01 2016

1.0.21

1.0.21.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

29/01 2016

1.0.2

1.0.2.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

20/01 2016

0.8.1

0.8.1.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

20/01 2016

0.8.0

0.8.0.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

19/01 2016

1.0.1

1.0.1.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez

19/01 2016

1.0.0

1.0.0.0

Create a resource API for Laravel 5.2: entity, repository, manager, validator, controller, migration, table , route and documentation

  Sources   Download

MIT

The Requires

 

by Iram Gutiérrez