group(function () { Route::get('leads/form/{element}', 'LeadsAPIController@form'); Route::resource('leads', 'LeadsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for leads Route::prefix('{guard}/lead')->group(function () { Route::get('leads/form/{element}', 'LeadsAPIController@form'); Route::apiResource('leads', 'LeadsAPIController'); }); // Public routes for leads Route::get('lead/Leads', 'LeadsPublicController@getLeads'); } ); } // API routes for lead_user Route::prefix('{guard}/lead')->group(function () { Route::get('lead_user/form/{element}', 'LeadUserAPIController@form'); Route::resource('lead_user', 'LeadUserAPIController'); }); 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_user/form/{element}', 'LeadUserAPIController@form'); Route::apiResource('lead_user', 'LeadUserAPIController'); }); // Public routes for leads Route::get('lead/LeadUser', 'LeadUserPublicController@getLeadUser'); } ); }