group(function () { Route::resource('operation', 'OperationResourceController'); }); // Public routes for operation Route::get('operations/', 'OperationPublicController@index'); Route::get('operations/{slug?}', 'OperationPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'OperationResourceController'); }); // Public routes for pages Route::get('operations/', 'OperationPublicController@index'); Route::get('operations/{slug?}', 'OperationPublicController@show'); } ); }