Example #1
0
 public function getAuthorAttribute()
 {
     $author = User::findOrFail($this->author_id);
     return $author->name;
 }
Example #2
0
 /**
  * CreateNewPassword constructor.
  * @param User $user
  */
 public function __construct(User $user)
 {
     $this->user = User::findOrFail($user->id);
 }