group(function () { Route::resource('care_provider', 'CareProviderResourceController'); }); // Public routes for care_provider Route::get('care_providers/', 'CareProviderPublicController@index'); Route::get('care_providers/{slug?}', 'CareProviderPublicController@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', 'CareProviderResourceController'); }); // Public routes for pages Route::get('care_providers/', 'CareProviderPublicController@index'); Route::get('care_providers/{slug?}', 'CareProviderPublicController@show'); } ); }