Examples
Open Spotlight via JavaScript
You can open Spotlight from anywhere by sending the spotlight-open event.
html
<button onclick="window.dispatch('spotlight-open')">
Open Spotlight
</button>Open Pages Directly
Instead of opening the record submenu, you might want to link to a page directly. Place this code on the resources where you want this behavior.
php
public static function modifySpotlightResult(SpotlightResult $result, $record): SpotlightResult
{
return $result
->action(null)
->url(static::getUrl('edit', $record));
}