| 1 | <?php |
||
| 8 | class User extends Authenticatable |
||
| 9 | { |
||
| 10 | use Notifiable; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * The attributes that are mass assignable. |
||
| 14 | * |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $fillable = [ |
||
| 18 | 'name', 'email', 'password', |
||
| 19 | ]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The attributes that should be hidden for arrays. |
||
| 23 | * |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $hidden = [ |
||
| 27 | 'password', 'remember_token', |
||
| 28 | ]; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get the notes for the user. |
||
| 32 | * |
||
| 33 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 34 | */ |
||
| 35 | public function notes() |
||
| 36 | { |
||
| 37 | return $this->hasMany(Note::class); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |