group(function () { Route::resource('report', 'ReportResourceController'); }); // Public routes for report Route::get('reports/', 'ReportPublicController@index'); Route::get('reports/{slug?}', 'ReportPublicController@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', 'ReportResourceController'); }); // Public routes for pages Route::get('reports/', 'ReportPublicController@index'); Route::get('reports/{slug?}', 'ReportPublicController@show'); } ); }