*/ protected $fillable = [ 'user_id', 'name', 'type', 'price', 'rooms', 'space', 'yandex_mark', 'location', 'description', 'is_group', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'type' => OrderTypesEnum::class, 'rooms' => RoomTypesEnum::class, 'space' => 'double', 'price' => 'double', 'is_group' => 'boolean', ]; /** * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function images(): HasMany { return $this->hasMany(OfferPhoto::class); } }