*/ protected $fillable = [ 'fname', 'mname', 'lname', 'position', 'email', 'password', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', ]; /** * Get the posts authored by the user. * * @return HasMany */ public function posts(): HasMany { return $this->hasMany(Post::class); } /** * Get the comments authored by the user. * * @return HasMany */ public function comments(): HasMany { return $this->hasMany(Comment::class); } }