Download the PHP package kainiklas/filament-scout without Composer

On this page you can find all versions of the php package kainiklas/filament-scout. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-scout

Filament Scout Plugin

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Filament Scout Plugin

Plugin to integrate Laravel Scout into Filament Global Search and Table Search. Plus a ScoutSelect component which enhances the standard Select Field with scout search capabilities.

Pre-Requesites

Installation

You can install the package via composer:

Table Search

To use Scout Search instead of the default search on a table, add the trait InteractsWithScout to any Page which contains a table, e.g. app\Filament\Resources\MyResource\Pages\ListMyResources.php:

The table defined in the resource needs to be searchable() as described in the Filament table docs. Making each column searchable is not required anymore, as the content of what is searchable is defined within scout.

Increase the number of search results

Depending on the scout engine you may have limitations on how many search results you get back. This can be adjusted in two places:

1. Search Limit

Add the following env variable to adjust the limit of search results:

100 is the default value within this pagacke. For example meilisearch has a default limit of 20.

2. Index Settings (Example for meilisearch)

Within meilisearch there is a default limit of 1000 total hits which is also the upper bound for the search limit. That means if you want to have more than 1000 search results, you need to adapt both: the search limit and the index settings. The index settings can be adjusted within config\scout.php:

Then run the following command to sync the settings: php artisan scout:sync-index-settings

Global Search

  1. Check how to enable Global Search in the Filament Documentation.

  2. Add the Plugin FilamentScoutPlugin to your panel configuration, e.g., in app\Providers\Filament\AdminPanelProvider.php.

Meilisearch

If you are using Meilisearch, you can activate meilisearch specific features (search context highlighting):

  1. Configure the plugin.

  2. (Optional) Implement/ Adapt getGlobalSearchResultDetails() in your Resource:

Select Form Field

To enable scout search in your select form fields use the provided ScoutSelect component:

Technically, the ScoutSelect component inherits from Filament\Forms\Components\Select. The useScout() method sets a new getSearchResultsUsing() closure which uses scout.

Important: The useScout() method needs to be called after the relationship method. Otherwise it is overriden by the relationship() method.

Hint: Only values which are accessible and defined by scout are searchable.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-scout with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.0
laravel/scout Version ^10.5
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kainiklas/filament-scout contains the following files

Loading the files please wait ....