group(function () { Route::get('referral/form/{element}', 'ReferralAPIController@form'); Route::resource('referral', 'ReferralAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for listings Route::prefix('{guard}/listing')->group(function () { Route::get('referral/form/{element}', 'ReferralAPIController@form'); Route::apiResource('referral', 'ReferralAPIController'); }); // Public routes for listings Route::get('listing/Referral', 'ReferralPublicController@getReferral'); } ); }