router->bind('server', function ($value) use ($request) { try { return Container::getInstance()->make(ServerRepositoryInterface::class)->findFirstWhere([ ['uuidShort', '=', $value], ]); } catch (RecordNotFoundException $ex) { $request->attributes->set('is_missing_model', true); return null; } }); return parent::handle($request, $next); } }