group(function () { Route::get('emails/form/{element}', 'EmailsAPIController@form'); Route::resource('emails', 'EmailsAPIController'); }); // Public routes for emails Route::get('emails/', 'EmailsPublicController@index'); Route::get('emails/{slug?}', 'EmailsPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for emails Route::prefix('{guard}/email')->group(function () { Route::get('emails/form/{element}', 'EmailsAPIController@form'); Route::apiResource('emails', 'EmailsAPIController'); }); // Public routes for emails Route::get('email/Emails', 'EmailsPublicController@getEmails'); } ); }