Route::get('tags', 'Tags@view'); Route::post('tags', 'Tags@add'); Route::delete('tags/{tag}', 'Tags@remove'); Route::get('relations', 'Relations@index'); Route::post('relations/{related}', 'Relations@store'); Route::delete('relations/{related}', 'Relations@destroy'); Route::get('acl', 'Acl@index'); Route::put('acl', 'Acl@update'); Route::post('acl/{group}', 'Acl@store'); Route::delete('acl/{group}', 'Acl@destroy'); Route::get('', 'PageController@getIndex'); }); }); }); }); Route::group(['prefix' => 'asset'], function () { Route::get('version/{id}/{width?}/{height?}', ['as' => 'asset-version', 'middleware' => ['web', Middleware\RequireLogin::class], 'uses' => function ($versionId, $width = null, $height = null) { $asset = Asset::findByVersionId($versionId); return App::make(AssetHelper::controller($asset), [$asset])->view($width, $height); }]); Route::get('{asset}/download', ['asset' => 'asset-download', 'middleware' => [Middleware\LogAssetDownload::class], 'uses' => function ($asset) { return App::make(AssetHelper::controller($asset), [$asset])->download(); }]); Route::get('{asset}/{action}.{extension}', ['as' => 'asset', 'middleware' => [Middleware\CheckAssetETag::class], 'uses' => function ($asset, $action = 'view', $width = null, $height = null) { return App::make(AssetHelper::controller($asset), [$asset])->{$action}($width, $height); }])->where(['action' => '[a-z]+', 'extension' => '[a-z]+']); Route::get('{asset}/{action?}/{width?}/{height?}', ['as' => 'asset', 'middleware' => [Middleware\CheckAssetETag::class], 'uses' => function ($asset, $action = 'view', $width = null, $height = null) { return App::make(AssetHelper::controller($asset), [$asset])->{$action}($width, $height); }]); }); Route::any('{location}.{format?}', ['middleware' => ['web', Middleware\RoutePage::class, Middleware\CheckPageAcl::class, Middleware\InsertCMSToolbar::class], 'uses' => 'BoomCMS\\Http\\Controllers\\PageController@show'])->where(['location' => '(.*?)', 'format' => '([a-z]+)']);