blemli/websearch-for-filament
websearch
Search the web from any Filament field.
A hint action that opens a search for the field's value on Google, DuckDuckGo, Bing, Brave, Swisscows, Ecosia, Startpage, Qwant, Yandex or Baidu, with harmonised filters (images, videos, news, shopping, license, transparency, size, layout, timespan, country). Users can pick their own engine. No migration needed.
Installation
composer require blemli/websearch-for-filament
php artisan websearch-for-filament:install -n
Register the plugin in your panel provider: ->plugin(WebSearchPlugin::make()->userChoice())
Usage
TextInput::make('name')->websearch(), // "Search on Google" for the field's value
FileUpload::make('image')->imagesearch(['vendor', 'name']), // image search for two fields joined
FileUpload::make('image')->imagesearch('name', fn (WebSearchAction $a) => $a->transparent()->license(License::CreativeCommons)),
WebSearchAction::make()->query('name')->engine(DuckDuckGo::class)->news()->within(Timespan::Week), // any action slot
Google::images('Fujifilm GFX')->transparent()->layout(Layout::Tall)->url(); // just the URL, no Filament needed
Results open in a new tab by default; ->openInSameTab(), ->openInPopup() and ->openInSlideOver() (Swisscows, Bing, Baidu) are available on the action and in the user's profile (restrict them with ->exceptOpenModes([OpenIn::Popup])) when Filament Breezy is installed. ->trackSearches() on the plugin fires a SearchOpened event and logs to spatie/laravel-activitylog when present. Ships in English and German.
License
MIT © blemli
Related Packages
A comprehensive Filament plugin for managing Laravel Scout indexes and search se...
A thumb-friendly mobile bottom navigation bar for Filament panels. It programmat...
Extend Filament's notification drawer with customizable tabs and notification ca...
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| v0.1.1 | ^8.2 | MIT | |
| v0.1.0 | ^8.2 | MIT |