group(function () { Route::get('buyer/form/{element}', 'BuyerAPIController@form'); Route::resource('buyer', 'BuyerAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for buyers Route::prefix('{guard}/buyer')->group(function () { Route::get('buyer/form/{element}', 'BuyerAPIController@form'); Route::apiResource('buyer', 'BuyerAPIController'); }); // Public routes for buyers Route::get('buyer/Buyer', 'BuyerPublicController@getBuyer'); } ); }