Add Meilisearch deploy support and studio grid tweak

This commit is contained in:
2026-04-06 09:33:28 +02:00
parent 08ad757bcb
commit 23d363a50c
4 changed files with 78 additions and 1 deletions

View File

@@ -355,6 +355,21 @@ class User extends Authenticatable
*/
protected static function bootSearchable(): void
{
// Register the SearchableScope so that the Builder::searchable() macro
// is available (needed for scout:import and manual ::searchable() calls).
// We intentionally skip static::observe(new ModelObserver) so that
// User saves/deletes do not auto-enqueue Scout sync jobs.
static::addGlobalScope(new \Laravel\Scout\SearchableScope);
$whenBootedCallback = function () {
(new static)->registerSearchableMacros();
};
if (method_exists(static::class, 'whenBooted')) {
static::whenBooted($whenBootedCallback);
} else {
$whenBootedCallback();
}
}
/**