Runway integrates with Statamic's Search functionality, allowing you to search your Eloquent models in the Conteol Panel and via the {{ search:results }}
tag. It's as simple as adjusting your config file.
// config/statamic/search.php'myindex' => ['driver' => 'local','searchables' => ['collection:blog', 'runway:order'],]
// config/statamic/search.php'myindex' => ['driver' => 'local','searchables' => ['collection:blog', 'runway:order'],]
You can scope the resources you'd like to be searchable, using the runway:{resourceHandle}
syntax. If you'd like everything in Runway to be searchable, you can userunway:*
.
By default, when displaying search results, Runway will use the first listable column as the 'title field'. If you'd like to change this, add the title_field
option to your resource's config:
'resources' => [\App\Models\Order::class => ['name' => 'Orders','title_field' => 'name',],],
'resources' => [\App\Models\Order::class => ['name' => 'Orders','title_field' => 'name',],],
For further documentation on integrating Search in your site, please review the Statamic Documentation.