Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
This package is possibly abandoned. Please proceed with care.

Installation Instructions

You must have Laravel Scout and Algolia already configured to use these tools.

composer require nathanheffley/nova-algolia

You can add the \NathanHeffley\NovaAlgolia\NovaAlgolia tool to your NovaServiceProvider@tools array:

public function tools()
{
    return [
        // ...
        new \NathanHeffley\NovaAlgolia\NovaAlgolia,
    ];
}
image

Note: this tool page currently only works if you use the default searchableAs value for models. For example, the User model's searchableAs must be users. The following resource tool works no matter what the searchableAs value is.

You can add the resource tool to any Nova resource that represents a Searchable model.

In your model's Nova resource file:

public function fields(Request $request)
{
    return [
        // ...
        \NathanHeffley\NovaAlgolia\AlgoliaResourceTool::make(),
    ];
}
image

Readme

Algolia integration with Laravel Nova.

Latest Stable Version Total Downloads

image

Installation

You can install the package in any Laravel app that uses Nova via composer:

composer require nathanheffley/nova-algolia

To view your indexed search data for a Searchable model, you'll need to add the tool to that model's Nova resource. Make sure to specify the class name so the resource tool can load it properly.

// in app/Nova/ResourceName.php

public function fields(Request $request)
{
    return [
        // ...

        \NathanHeffley\NovaAlgolia\AlgoliaResourceTool::make()->className(\App\ModelName::class),
    ];
}

If you want to use the "Import to Algolia" or "Remove from Algolia" actions, you just need to add them to the actions array on your Nova resource.

// in app/Nova/ResourceName.php

public function actions(Request $request)
{
    return [
        // ...

        new \NathanHeffley\NovaAlgolia\Actions\ImportAlgolia,
        new \NathanHeffley\NovaAlgolia\Actions\RemoveAlgolia,
    ];
}

If you have not set up Scout or Algolia yet, follow the directions from the official instructions: Algolia and Laravel Scout.

License

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

Back to Top
Added 7 years ago
Last updated 7 Years Ago
Version v1.0.0
Composer
nathanheffley/nova-algolia
GitHub stars 7
Packagist downloads 2,140

Favorites

4 users favorited

Rating

5.00
(out of 5)
★★★★★
★★★★
★★★
★★
1 ratings

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas