2017 © Pedro Peláez
 

library laravel-apicontroller

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

image

eventhomes/laravel-apicontroller

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  • Tuesday, June 23, 2015
  • by roundedvision
  • Repository
  • 3 Watchers
  • 8 Stars
  • 41,168 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 12 % Grown

The README.md

Laravel 5 / Lumen 5 Api Controller

A simple api controller helper trait, compatible with Lumen 5+ and Laravel 5+. The goal of this project is to make creating API projects simple. Inspired by Jeffrey Way (https://www.laracasts.com), (*1)

Installation

composer require eventhomes/laravel-apicontroller, (*2)

Basic Setup/Usage

...
use EventHomes\Api\ApiController;

class MyController extends Controller {

    use ApiController;

    public function index() {
        return $this->respond(['status' => 'hello world']);
    }

}

Api Helper functions

Please browse through the source to see a full list., (*3)

//200 response
$this->respond();

//201 response
$this->respondCreated();

//500 error
$this->respondServerError();

//422 error
$this->respondUnprocessable();

//General error
$this->respondWithError('message here');

Add Fractal Helpers

Please use [https://github.com/eventhomes/laravel-fractalhelper], (*4)

The Versions

23/06 2015

dev-master

9999999-dev

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

23/06 2015

dev-develop

dev-develop

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

23/06 2015

0.1.8

0.1.8.0

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

22/06 2015

0.1.7

0.1.7.0

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

21/06 2015

0.1.6

0.1.6.0

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

21/06 2015

0.1.5

0.1.5.0

Simplified API controller using fractal, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

21/06 2015

0.1.4

0.1.4.0

Simplified API controller using fractal, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

21/06 2015

0.1.3

0.1.3.0

Simplified API controller using fractal, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

21/06 2015

0.1.2

0.1.2.0

Simplified API controller using fractal, inspired by Jeffrey Way. Compatible with Laravel 5+ and Lumen 5+.

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel api lumen fractal api controller

21/06 2015

0.1.1

0.1.1.0

Simplified api controller using fractal, inspired by Jeffrey Way

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel fractal apicontroller

19/06 2015

0.1.0

0.1.0.0

Simplified api controller using fractal, inspired by Jeffrey Way

  Sources   Download

MIT

The Requires

 

by Bill Richards

laravel fractal apicontroller