'integer', 'tags' => 'array', 'featured' => 'boolean', 'active' => 'boolean', 'published_at' => 'datetime', ]; public function scopeActive(Builder $query): Builder { return $query->where('active', true); } public function scopePublished(Builder $query): Builder { return $query->whereNotNull('published_at')->where('published_at', '<=', now()); } public function prompts(): BelongsToMany { return $this->belongsToMany(AcademyPromptTemplate::class, 'academy_prompt_pack_items', 'pack_id', 'prompt_template_id') ->withPivot('order_num') ->withTimestamps() ->orderBy('academy_prompt_pack_items.order_num'); } }