Find a model by his id

@param $id
@return mixed
@throw \Palmabit\Authentication\Exceptions\GroupNotFoundException
551489
public function find($id) {
    try {
      $user = $this->sentry->findGroupById($id);
    } catch (GroupNotFoundException $e) {
      throw new NotFoundException;
    }

    return $user;
  }
813155
public static function find($id) { 
        $array = KernelDB::find(static::$model, $id);
        $routeModel = Dir::apiModel(static::$model);
        return self::arrayToModel($routeModel, $array);
    }
1248629
public function find($id)
    {
        $query = $this->getModel()->newQuery();
        $this->fire($this->event('find'), [$query]);

        if (!$model = $query->find($id)) {
            return;
        }

        $this->fire($this->event('found'), [$model]);

        return $model;
    }
1055331
protected function findUser($id)
    {
        if (($model = User::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }
84430
protected function findModel($id)
    {
        if (($model = Order::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }
929361
public function find($id)
    {
        if (!($object = $this->getDoctrineEntityRepository()->find($id))) {
            $this->throwException(sprintf('The resource \'%s\' was not found', $id), 'not-found');
        }

        return $object;
    }
189446
protected function findModel($id)
    {
        $user = $this->finder->findUserById($id);
        if ($user === null) {
            throw new NotFoundHttpException('The requested page does not exist');
        }

        return $user;
    }
577087
protected function findModel($id)
    {
        if (($model = Message::find()
                ->where(['id' => $id, 'parent' => null])->andWhere(['or', ['from_id' => Yii::$app->user->id], ['user_id' => Yii::$app->user->id]])->limit(1)->one()) !== null
        ) {
            return $model;
        } else {
            throw new NotFoundHttpException (Yii::t('message', 'The requested page does not exist.'));
        }
    }
564227
protected function findModel($id)
    {
        if (($model = \yongtiger\admin\models\Log::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
183874
public function findModel($id)
    {
        $model = call_user_func_array([$this->MainModel, 'findOne'], [$id]);
        if ($model !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
1207567
protected function findModel($id)
    {
        if (($model = TermType::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }
805442
public function find($id)
    {
        $query = $this->getQuery();
        if ($this->isRestorable()) {
            $query->withTrashed();
        }

        return $query->find($id);
    }
1294984
public function findOrFail($id)
    {
        if ($model = $this->find($id)) {
            return $model;
        }
        throw (new ModelNotFoundException)->setModel(get_class($this->getModel()));
    }
307397
protected function findModel($id)
    {
        $query = Fans::find()
            ->andWhere([
                'id' => $id,
                'wid' => $this->getWechat()->id
            ]);
        if (($model = $query->one()) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
962672
protected function findModel($id)
    {
        if (($model = ProductTypeMeta::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException(t('app', 'The requested page does not exist.'));
        }
    }
590329
public function findByIntOrFail(int $id): Model
    {
        $model = $this->findByInt($id);
        if (empty($model)) {
            throw new ResourceNotFoundException();
        }

        return $model;
    }
565748
public function find($id)
    {
        $response = $this->ontraport->get(
            $this->getSingularNamespace(), $this->toArray(compact('id'))
        );

        return $this->ontraport->item($this, $response);
    }