2017 © Pedro PelĂĄez
 

library laravel-easy-api

Laravel Easy Api Helper.

image

julianobailao/laravel-easy-api

Laravel Easy Api Helper.

  • Wednesday, February 1, 2017
  • by JUB4
  • Repository
  • 1 Watchers
  • 13 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Laravel - Easy Api

Latest Version on Packagist ![Software License][ico-license] Build Status StyleCI [![Coverage Status][ico-scrutinizer]][link-scrutinizer] Quality Score ![Total Downloads][ico-downloads] [![Donate][ico-donate]][link-donate], (*1)

This package will helps you build as quickly as possible your APIs, using pre-configured traits and resource controllers, see the wiki for more information., (*2)

Install

Via Composer, (*3)

$ composer require julianobailao/laravel-easy-api

Documentation

Please, see the wiki for the full documentation of this project., (*4)

Basic Usage

Create a Model:

Create a model and configure it has you wish., (*5)

``` php, (*6)

namespace App;, (*7)

use Illuminate\Database\Eloquent\Model;, (*8)

class Donkey extends Model { // }, (*9)


### Create a controller Create a controller, and use the ResourceTrait of this package. Exists one trait for each method from resource controller equivalent, if you want use a especific methods, and not all of then, read about [Independent Methods](#). ``` php namespace App\Http\Controllers; use JulianoBailao\LaravelEasyApi\ResourceTrait; class DonkeyController extends Controller { use ResourceTrait; }

Route

Configure your route like a resource controller:, (*10)

php Route::resource('donkeys', 'DonkeyController', ['except' => ['create', 'edit']]);, (*11)

It's runing!

You have a resource controller with the index, show, store, update and destroy methods, runing for model Donkey, in the /donkeys route., (*12)

Please, see the wiki for the full documentation of this project., (*13)

License

The MIT License (MIT). Please see License File for more information., (*14)

Support this project and others, via PayPal., (*15)

[![Donate][ico-donate]][link-donate], (*16)

The Versions