*/ use HasFactory, Notifiable; protected $fillable = [ 'name', 'email', 'password', 'is_admin', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'is_admin' => 'boolean', ]; } /** * Get the jobs saved by this user. */ public function savedJobs(): BelongsToMany { return $this->belongsToMany(Job::class, 'user_saved_jobs') ->withTimestamps(); } /** * Get the job alerts for this user. */ public function jobAlerts(): HasMany { return $this->hasMany(UserJobAlert::class); } }