Skip to content

Instantly share code, notes, and snippets.

@evercode1
Created December 31, 2014 17:03
Show Gist options
  • Select an option

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

Select an option

Save evercode1/dafa53b29ab8585d648d to your computer and use it in GitHub Desktop.
getUserLink and getUserIdLink Chap 5
/**
* get user id Link
*
*/
public function getUserIdLink()
{
$url = Url::to(['user/update', 'id'=>$this->id]);
$options = [];
return Html::a($this->id, $url, $options);
}
/**
* @getUserLink
*
*/
public function getUserLink()
{
$url = Url::to(['user/view', 'id'=>$this->id]);
$options = [];
return Html::a($this->username, $url, $options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment