SearchJetEngine

Step-by-Step Installation & Configuration

Step 1: Install the Package via Composer

Open your terminal, navigate to your Laravel project directory, and run the following command:

bash

composer require maidulcu/laravel-searchjetengine

Step 2: Publish the Configuration File

Publish the package configuration file to your Laravel application’s config directory.

bash

php artisan vendor:publish --provider="Maidul\SearchJet\SearchJetServiceProvider"

This will create a new file: config/searchjet.php.

Step 3: Configure Environment Variables

Open your .env file and add the following environment variables. These are the connection details for your WordPress site.

ini

# SearchJet WordPress Site Configuration
SEARCHJET_WP_URL=https://your-wordpress-site.com
SEARCHJET_API_KEY=your_searchjet_api_key_here
SEARCHJET_API_SECRET=your_searchjet_api_secret_here
  • SEARCHJET_WP_URL: The full base URL of your WordPress installation (without a trailing slash).
  • SEARCHJET_API_KEY: The API key generated from your SearchJet plugin settings in the WordPress admin panel.
  • SEARCHJET_API_SECRET: The API secret associated with the above key.

Step 4: Verify Configuration (Optional)

Open the published config/searchjet.php file to see the final configuration. It uses the environment variables you just set.

php

 env('SEARCHJET_WP_URL'),
    'api_key' => env('SEARCHJET_API_KEY'),
    'api_secret' => env('SEARCHJET_API_SECRET'),
    
    // Gutenberg-specific settings
    'gutenberg' => [
        'parse_blocks' => true,
        'include_block_types' => ['core/paragraph', 'core/heading', 'core/list'],
        'exclude_block_types' => ['core/embed'],
    ],
];