https://github.com/zofe/search-module
https://github.com/zofe/search-module
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/zofe/search-module
- Owner: zofe
- License: mit
- Created: 2023-03-06T10:57:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-29T10:35:35.000Z (about 1 year ago)
- Last Synced: 2025-11-22T17:17:47.656Z (5 months ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Rapyd Admin - Search Module
This is the search module of [Rapyd Admin](https://github.com/zofe/rapyd-admin), a Laravel application bootstrap for your projects
It embed:
- global search dependencies: laravel scout (meilisearch/algolia/typesense)
- search widgets integrated in Rapyd Admin frontend/admin
# Installation & configuration
By default, this "field" search in a list of models you can define in the config file,
for each model you need to specify:
* the class
* the query scope
* the route (to link at result detail)
* the query limit
* the view (of the result item, to customize item appareance)
```php
'models' => [
[
'class' => \App\Models\User::class,
'scope' => 'ssearch',
'route' => 'auth.users.view',
'limit' => 5,
'view' => 'search::item',
],
]
```
# Usage
This command will create a folder "Search" in your /app/Modules/ folder.
this component:
`/app/Modules/Search/Livewire/SearchNavbar.php`
has the logic of "global search" in the project.
searches the users, and potentially the main models of all other installed modules.