Fixed where clause for MariaDB compatibility

This commit is contained in:
kaktusss
2023-09-06 16:04:47 +02:00
committed by GitHub
parent a3a4cf2a66
commit 970afcfd40
@@ -85,7 +85,7 @@ class DatabaseNotifications extends Component
public function getNotificationsQuery(): Builder | Relation
{
/** @phpstan-ignore-next-line */
return $this->getUser()->notifications()->where('data->format', 'filament');
return $this->getUser()->notifications()->whereRaw('JSON_UNQUOTE(JSON_EXTRACT(data,\'$.format\')) = "filament"');
}
public function getUnreadNotificationsQuery(): Builder | Relation