group(function () { Route::get('report/form/{element}', 'ReportAPIController@form'); Route::resource('report', 'ReportAPIController'); }); // 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 reports Route::prefix('{guard}/report')->group(function () { Route::get('report/form/{element}', 'ReportAPIController@form'); Route::apiResource('report', 'ReportAPIController'); }); // Public routes for reports Route::get('report/Report', 'ReportPublicController@getReport'); } ); }