group(function () { Route::resource('lead', 'LeadResourceController'); }); 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', 'LeadResourceController'); }); // Public routes for pages Route::get('leads/', 'LeadPublicController@index'); Route::get('leads/{slug?}', 'LeadPublicController@show'); } ); }