private function findReceipt($hash) { $model = Receipt::findByHash($hash); if (!$model) { throw new NotFoundHttpException(); } return $model; }