Installation
Requirements
Section titled “Requirements”Before installing Scoutify, ensure your application meets these requirements:
- PHP ^8.1
- Laravel ^10 | ^11 | ^12
- Livewire ^3 | ^4
- Laravel Scout ^11
Composer Install
Section titled “Composer Install”Install the package via Composer:
composer require matheusmarnt/scoutifyThe scoutify:install command
Section titled “The scoutify:install command”Run the installation command to set up the necessary configuration and dependencies:
php artisan scoutify:installThis command will:
- Prompt you to choose a Scout driver (Meilisearch, Algolia, or Typesense).
- Install the required Composer packages for the chosen driver.
- Publish the configuration files (
config/scoutify.phpandconfig/scout.php). - Set the
SCOUT_DRIVERin your.envfile.
Publishing Config
Section titled “Publishing Config”If you need to publish the configuration file manually:
php artisan vendor:publish --tag=scoutify-configTailwind CSS v4 Setup
Section titled “Tailwind CSS v4 Setup”The scoutify:install command automatically adds the necessary @import to your resources/css/app.css file.
If you’re setting up manually or using a different CSS file, ensure you have the following import:
@import 'tailwindcss';@import "../../vendor/matheusmarnt/scoutify/resources/css/scoutify.css";Mounting the Modal
Section titled “Mounting the Modal”Add the global search modal component to your root layout (usually layouts/app.blade.php), preferably at the end of the <body> tag, after the main content slot:
{{-- resources/views/layouts/app.blade.php --}}{{ $slot }}
<livewire:scoutify::modal />
@livewireScripts