group(function () { Route::resource('leads', 'LeadsResourceController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'LeadsResourceController'); }); // Public routes for pages Route::get('leads/', 'LeadsPublicController@index'); Route::get('leads/{slug?}', 'LeadsPublicController@show'); } ); } // web routes for lead_user Route::prefix('{guard}/lead')->group(function () { Route::resource('lead_user', 'LeadUserResourceController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'LeadUserResourceController'); }); // Public routes for pages Route::get('leads/', 'LeadUserPublicController@index'); Route::get('leads/{slug?}', 'LeadUserPublicController@show'); } ); }