Skip to content

Instantly share code, notes, and snippets.

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

  • Save evercode1/047e5209b5d0cb7d9376 to your computer and use it in GitHub Desktop.

Select an option

Save evercode1/047e5209b5d0cb7d9376 to your computer and use it in GitHub Desktop.
actionIndex profile controller chap 8
public function actionIndex()
{
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