group(function () { Route::get('deliverylocation/form/{element}', 'DeliverylocationAPIController@form'); Route::resource('deliverylocation', 'DeliverylocationAPIController'); }); // Public routes for deliverylocation Route::get('delivery_locations/', 'DeliverylocationPublicController@index'); Route::get('delivery_locations/{slug?}', 'DeliverylocationPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for delivery_locations Route::prefix('{guard}/delivery_location')->group(function () { Route::get('deliverylocation/form/{element}', 'DeliverylocationAPIController@form'); Route::apiResource('deliverylocation', 'DeliverylocationAPIController'); }); // Public routes for delivery_locations Route::get('delivery_location/Deliverylocation', 'DeliverylocationPublicController@getDeliverylocation'); } ); } // API routes for restaurant_delivery_location Route::prefix('{guard}/delivery_location')->group(function () { Route::get('restaurant_delivery_location/form/{element}', 'RestaurantDeliveryLocationAPIController@form'); Route::resource('restaurant_delivery_location', 'RestaurantDeliveryLocationAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for delivery_locations Route::prefix('{guard}/delivery_location')->group(function () { Route::get('restaurant_delivery_location/form/{element}', 'RestaurantDeliveryLocationAPIController@form'); Route::apiResource('restaurant_delivery_location', 'RestaurantDeliveryLocationAPIController'); }); // Public routes for delivery_locations Route::get('delivery_location/RestaurantDeliveryLocation', 'RestaurantDeliveryLocationPublicController@getRestaurantDeliveryLocation'); } ); }