*/ protected $fillable = [ 'name', 'description', 'category', 'template_data', 'is_public', 'user_id', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'is_public' => 'boolean', 'template_data' => 'array', ]; } /** * Get the user that owns the prompt template. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\User, \App\Models\PromptTemplate> */ public function user(): BelongsTo { return $this->belongsTo(User::class); } }