Skip to content

Instantly share code, notes, and snippets.

View murilolopes's full-sized avatar

Murilo Angelo murilolopes

  • Maceió, Alagoas
View GitHub Profile
@murilolopes
murilolopes / RestControllerTrait.php
Created September 2, 2016 01:25 — forked from beanmoss/RestControllerTrait.php
Playing with Laravel Lumen: simple RESTful trait.
<?php namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait
{
public function index()
{
$m = self::MODEL;
return $this->listResponse($m::all());