Commit bc5754d5 authored by Nicolas Widart's avatar Nicolas Widart

Typehinting the router

parent b742e066
<?php
use Illuminate\Routing\Router;
$router->model('media', 'Modules\Media\Entities\File');
$router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin|permissions'], function($router)
$router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'LaravelLocalizationRedirectFilter|auth.admin|permissions'], function(Router $router)
{
$router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Media\Http\Controllers'], function(Router $router)
{
$router->group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\Media\Http\Controllers'], function($router)
{
$router->resource('media', 'Admin\MediaController', ['except' => ['show'], 'names' => [
'index' => 'dashboard.media.index',
'create' => 'dashboard.media.create',
'store' => 'dashboard.media.store',
'edit' => 'dashboard.media.edit',
'update' => 'dashboard.media.update',
'destroy' => 'dashboard.media.destroy',
]]);
});
$router->resource('media', 'Admin\MediaController', ['except' => ['show'], 'names' => [
'index' => 'dashboard.media.index',
'create' => 'dashboard.media.create',
'store' => 'dashboard.media.store',
'edit' => 'dashboard.media.edit',
'update' => 'dashboard.media.update',
'destroy' => 'dashboard.media.destroy',
]]);
});
});
$router->get('admin/grid-files', 'Modules\Media\Http\Controllers\Admin\MediaController@gridFiles');
$router->group(['prefix' => 'api', 'namespace' => 'Modules\Media\Http\Controllers'], function ($router) {
$router->resource('media', 'Api\MediaController', ['only' => ['store']]);
});
$router->group(['prefix' => 'api', 'namespace' => 'Modules\Media\Http\Controllers'], function (Router $router) {
$router->resource('media', 'Api\MediaController', ['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