group(function () { Route::get('discussion/form/{element}', 'DiscussionAPIController@form'); Route::resource('discussion', 'DiscussionAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for discussions Route::prefix('{guard}/discussion')->group(function () { Route::get('discussion/form/{element}', 'DiscussionAPIController@form'); Route::apiResource('discussion', 'DiscussionAPIController'); }); // Public routes for discussions Route::get('discussion/Discussion', 'DiscussionPublicController@getDiscussion'); } ); }