group(function () { Route::get('listing/form/{element}', 'ListingAPIController@form'); Route::resource('listing', 'ListingAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for divas Route::prefix('{guard}/diva')->group(function () { Route::get('listing/form/{element}', 'ListingAPIController@form'); Route::apiResource('listing', 'ListingAPIController'); }); // Public routes for divas Route::get('diva/Listing', 'ListingPublicController@getListing'); } ); }