group(function () { Route::get('care_provider/form/{element}', 'CareProviderAPIController@form'); Route::resource('care_provider', 'CareProviderAPIController'); }); // 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 care_providers Route::prefix('{guard}/care_provider')->group(function () { Route::get('care_provider/form/{element}', 'CareProviderAPIController@form'); Route::apiResource('care_provider', 'CareProviderAPIController'); }); // Public routes for care_providers Route::get('care_provider/CareProvider', 'CareProviderPublicController@getCareProvider'); } ); }