group(function () { Route::resource('deliverylocation', 'DeliverylocationResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'DeliverylocationResourceController'); }); // Public routes for pages Route::get('delivery_locations/', 'DeliverylocationPublicController@index'); Route::get('delivery_locations/{slug?}', 'DeliverylocationPublicController@show'); } ); } // web routes for restaurant_delivery_location Route::prefix('{guard}/delivery_location')->group(function () { Route::resource('restaurant_delivery_location', 'RestaurantDeliveryLocationResourceController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'RestaurantDeliveryLocationResourceController'); }); // Public routes for pages Route::get('delivery_locations/', 'RestaurantDeliveryLocationPublicController@index'); Route::get('delivery_locations/{slug?}', 'RestaurantDeliveryLocationPublicController@show'); } ); }