*/ protected $fillable = [ 'type', 'doc_number', 'doc_type', 'doc_certifier' ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'date' => 'datetime', 'expiration_date' => 'datetime' ]; public function user(): BelongsTo { return $this->belongsTo(User::class); } public function addedBy(): BelongsTo { return $this->belongsTo(User::class); } public function documentFile(): BelongsTo { return $this->belongsTo(DocumentFile::class); } }