SQLSTATE[42S22]: Column not found: 1054 Unknown column 'publish_status' in 'where clause'
$table->filters([
SelectFilter::make('status')
->label('Publish status')
->options([
'published' => 'published',
'scheduled' => 'scheduled',
'draft' => 'draft',
])
->attribute('publish_status'),
])public function publishStatus(): Attribute
{
return Attribute::make(
get: function() {
if ($this->published_at) {
return 'published';
}
if ($this->scheduled_at) {
return 'scheduled';
}
return 'draft';
},
);
}