group(function () { Route::get('lead/form/{element}', 'LeadAPIController@form'); Route::resource('lead', 'LeadAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for leads Route::prefix('{guard}/lead')->group(function () { Route::get('lead/form/{element}', 'LeadAPIController@form'); Route::apiResource('lead', 'LeadAPIController'); }); // Public routes for leads Route::get('lead/Lead', 'LeadPublicController@getLead'); } ); }