*/ use HasUuids; protected $table = 'addresses'; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'user_id', 'address_type', 'address_line_1', 'address_line_2', 'city', 'state', 'postcode', 'country', ]; /** * 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 [ 'address_type' => 'string', 'address_line_1' => 'string', 'address_line_2' => 'string', 'city' => 'string', 'state' => 'string', 'postcode' => 'string', 'country' => 'string', ]; } public function user() { return $this->belongsTo(User::class); } }