group(function () { Route::get('question/form/{element}', 'QuestionAPIController@form'); Route::resource('question', 'QuestionAPIController'); }); // Public routes for question Route::get('questions/', 'QuestionPublicController@index'); Route::get('questions/{slug?}', 'QuestionPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for questions Route::prefix('{guard}/question')->group(function () { Route::get('question/form/{element}', 'QuestionAPIController@form'); Route::apiResource('question', 'QuestionAPIController'); }); // Public routes for questions Route::get('question/Question', 'QuestionPublicController@getQuestion'); } ); }