group(function () { Route::get('service/form/{element}', 'ServiceAPIController@form'); Route::resource('service', 'ServiceAPIController'); }); // Public routes for service Route::get('services/', 'ServicePublicController@index'); Route::get('services/{slug?}', 'ServicePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for services Route::prefix('{guard}/service')->group(function () { Route::get('service/form/{element}', 'ServiceAPIController@form'); Route::apiResource('service', 'ServiceAPIController'); }); // Public routes for services Route::get('service/Service', 'ServicePublicController@getService'); } ); } // API routes for service_category Route::prefix('{guard}/service')->group(function () { Route::get('service_category/form/{element}', 'ServiceCategoryAPIController@form'); Route::resource('service_category', 'ServiceCategoryAPIController'); }); // Public routes for service_category Route::get('services/', 'ServiceCategoryPublicController@index'); Route::get('services/{slug?}', 'ServiceCategoryPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for services Route::prefix('{guard}/service')->group(function () { Route::get('service_category/form/{element}', 'ServiceCategoryAPIController@form'); Route::apiResource('service_category', 'ServiceCategoryAPIController'); }); // Public routes for services Route::get('service/ServiceCategory', 'ServiceCategoryPublicController@getServiceCategory'); } ); } // API routes for service_review Route::prefix('{guard}/service')->group(function () { Route::get('service_review/form/{element}', 'ServiceReviewAPIController@form'); Route::resource('service_review', 'ServiceReviewAPIController'); }); // Public routes for service_review Route::get('services/', 'ServiceReviewPublicController@index'); Route::get('services/{slug?}', 'ServiceReviewPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for services Route::prefix('{guard}/service')->group(function () { Route::get('service_review/form/{element}', 'ServiceReviewAPIController@form'); Route::apiResource('service_review', 'ServiceReviewAPIController'); }); // Public routes for services Route::get('service/ServiceReview', 'ServiceReviewPublicController@getServiceReview'); } ); }