group(function () { Route::get('master/form/{element}', 'MasterAPIController@form'); Route::resource('master', 'MasterAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for masters Route::prefix('{guard}/master')->group(function () { Route::get('master/form/{element}', 'MasterAPIController@form'); Route::apiResource('master', 'MasterAPIController'); }); // Public routes for masters Route::get('master/Master', 'MasterPublicController@getMaster'); } ); }