Commit dac80072 authored by Nicolas Widart's avatar Nicolas Widart

Adding base controllers

parent 3cb79478
<?php namespace Modules\Menu\Http\Controllers\Admin;
use Modules\Core\Http\Controllers\Admin\AdminBaseController;
class MenuController extends AdminBaseController
{
}
<?php namespace Modules\Menu\Http\Controllers\Api;
use Modules\Core\Http\Controllers\Admin\AdminBaseController;
class MenuController extends AdminBaseController
{
}
<?php namespace Modules\Menu\Http\Controllers;
use Illuminate\Routing\Controller;
class MenuController extends Controller
{
}
......@@ -2,6 +2,21 @@
use Illuminate\Routing\Router;
$router->group(['prefix' => 'menu', 'namespace' => 'Modules\Menu\Http\Controllers'], function (Router $router) {
$router->get('/', 'MenuController@index');
$router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin|permissions'], function(Router $router)
{
$router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Menu\Http\Controllers'], function(Router $router)
{
$router->resource('menu', 'Admin\MenuController', ['except' => ['show'], 'names' => [
'index' => 'dashboard.menu.index',
'create' => 'dashboard.menu.create',
'store' => 'dashboard.menu.store',
'edit' => 'dashboard.menu.edit',
'update' => 'dashboard.menu.update',
'destroy' => 'dashboard.menu.destroy',
]]);
});
});
$router->group(['prefix' => 'api', 'namespace' => 'Modules\Menu\Http\Controllers'], function (Router $router) {
$router->resource('media', 'Api\MenuController', ['only' => ['store']]);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment