group(function () { Route::resource('parcel', 'ParcelResourceController'); }); // Public routes for parcel Route::get('parcels/', 'ParcelPublicController@index'); Route::get('parcels/{slug?}', 'ParcelPublicController@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', 'ParcelResourceController'); }); // Public routes for pages Route::get('parcels/', 'ParcelPublicController@index'); Route::get('parcels/{slug?}', 'ParcelPublicController@show'); } ); }