Skip to content

Instantly share code, notes, and snippets.

@evercode1
Created January 1, 2015 01:58
Show Gist options
  • Select an option

  • Save evercode1/3692b2c85bcaec5198f1 to your computer and use it in GitHub Desktop.

Select an option

Save evercode1/3692b2c85bcaec5198f1 to your computer and use it in GitHub Desktop.
actionView Profile Controller Chap 8
public function actionView()
{
if ($already_exists = RecordHelpers::userHas('profile')) {
return $this->render('view', [
'model' => $this->findModel($already_exists),
]);
} else {
return $this->redirect(['create']);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment