*/ use HasUuids; protected $table = 'employments'; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'user_id', 'company_name', 'job_title', 'employment_type', 'salary', 'start_date', 'end_date', 'is_current', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'company_name' => 'string', 'job_title' => 'string', 'employment_type' => 'string', 'salary' => 'decimal:2', 'start_date' => 'date', 'end_date' => 'date', 'is_current' => 'boolean', ]; } public function user() { return $this->belongsTo(User::class); } }