'datetime', 'updated_at' => 'datetime' ]; protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } public function products() { return $this->hasMany(Product::class, 'category_id', 'uuid'); } public function getServerImageUrlAttribute($value) { if (!$value) return null; return asset('storage/' . $value); } }