Add Meilisearch deploy support and studio grid tweak
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user