group(function () { Route::get('education/form/{element}', 'EducationAPIController@form'); Route::resource('education', 'EducationAPIController'); }); // Public routes for education Route::get('education/', 'EducationPublicController@index'); Route::get('education/{slug?}', 'EducationPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for education Route::prefix('{guard}/education')->group(function () { Route::get('education/form/{element}', 'EducationAPIController@form'); Route::apiResource('education', 'EducationAPIController'); }); // Public routes for education Route::get('education/Education', 'EducationPublicController@getEducation'); } ); } // API routes for deal Route::prefix('{guard}/education')->group(function () { Route::get('deal/form/{element}', 'DealAPIController@form'); Route::resource('deal', 'DealAPIController'); }); // Public routes for deal Route::get('education/', 'DealPublicController@index'); Route::get('education/{slug?}', 'DealPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for education Route::prefix('{guard}/education')->group(function () { Route::get('deal/form/{element}', 'DealAPIController@form'); Route::apiResource('deal', 'DealAPIController'); }); // Public routes for education Route::get('education/Deal', 'DealPublicController@getDeal'); } ); }