*/ protected $fillable = [ 'account_id', 'contact_id', 'company_id', 'title', 'description', 'salary', 'salary_unit', 'currently_works_here', 'start_date', 'end_date', ]; /** * Valid value for salary unit. * * @var array */ public static $salaryUnits = [ 'year', 'month', 'week', 'day', 'hour', ]; /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ 'start_date' => 'datetime:Y-m-d', 'end_date' => 'datetime:Y-m-d', ]; /** * The attributes that aren't mass assignable. * * @var array|bool */ protected $guarded = ['id']; /** * Get the account record associated with the occupation. * * @return BelongsTo */ public function account() { return $this->belongsTo(Account::class); } /** * Get the contact record associated with the occupation. * * @return BelongsTo */ public function contact() { return $this->belongsTo(Contact::class); } /** * Get the company record associated with the occupation. * * @return BelongsTo */ public function company() { return $this->belongsTo(Company::class); } }