'array', 'tags' => 'array', 'is_published' => 'boolean', 'published_at' => 'datetime', ]; // Relationships public function author() { return $this->belongsTo(User::class, 'created_by'); } // Scopes public function scopePublished($query) { return $query->where('is_published', true); } public function subBab() { return $this->hasMany(BudidayaSub::class, 'id_artikel', 'id')->orderBy('urutan'); } }