Resource Controller for Laravel 5
rafflesargentina/l5-resource-controller is a Laravel package for resource controller for laravel 5.
It currently has 0 GitHub stars and 292 downloads on Packagist (latest version v1.7.3).
Install it with composer require rafflesargentina/l5-resource-controller.
Discover more Laravel packages by rafflesargentina
or browse all Laravel packages to compare alternatives.
Last updated
Resource Controller for Laravel 5
Via Composer
$ composer require rafflesargentina/l5-resource-controller
Create a controller like you normally would and change it to extend ResourceController class. Then set $repository an $resourceName properties:
Also you can set these optional properties:
Example:
<?php
namespace App\Http\Controllers;
use RafflesArgentina\ResourceController\ResourceController;
use App\Http\Requests\ArticleRequest;
use App\Repositories\ArticleRepository;
class ArticlesController extends ResourceController
{
protected $repository = ArticleRepository::class;
protected $formRequest = ArticleRequest::class;
protected $resourceName = 'articles';
}
And that's it :)
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.