Package Data | |
---|---|
Maintainer Username: | rafflesargentina |
Maintainer Contact: | mario@raffles.com.ar (Mario Patronelli) |
Package Create Date: | 2017-12-27 |
Package Last Update: | 2019-02-10 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-16 15:01:04 |
Package Statistics | |
---|---|
Total Downloads: | 292 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 0 |
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 mario@raffles.com.ar instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.