'array', 'tags' => 'array', 'is_published' => 'boolean', 'published_at' => 'datetime', ]; // Relationships public function author() { return $this->belongsTo(User::class, 'created_by'); } public function penyakit() { return $this->belongsTo(MasterPenyakit::class, 'id_penyakit', 'id_penyakit'); } // Scopes public function scopePublished($query) { return $query->where('is_published', true); } }