$routes = collect(Route::getRoutes()->getRoutesByName()); $serach = $routes->filter(function ($route) { return Str::contains($route->getName(), "admin."); }); dd($serach);