group(function () { Route::get('formms/form/{element}', 'FormmsAPIController@form'); Route::resource('formms', 'FormmsAPIController'); }); // Public routes for formms Route::get('formms/', 'FormmsPublicController@index'); Route::get('formms/{slug?}', 'FormmsPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for formms Route::prefix('{guard}/formm')->group(function () { Route::get('formms/form/{element}', 'FormmsAPIController@form'); Route::apiResource('formms', 'FormmsAPIController'); }); // Public routes for formms Route::get('formm/Formms', 'FormmsPublicController@getFormms'); } ); }