group(function () { Route::resource('plan', 'PlanResourceController'); }); // Public routes for plan Route::get('financial_plans/', 'PlanPublicController@index'); Route::get('financial_plans/{slug?}', 'PlanPublicController@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', 'PlanResourceController'); }); // Public routes for pages Route::get('financial_plans/', 'PlanPublicController@index'); Route::get('financial_plans/{slug?}', 'PlanPublicController@show'); } ); }