Skip to content
A Laravel Nova card for Algolia
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist/js
resources/js Initial commit Aug 23, 2018
routes
src Initial commit Aug 23, 2018
.editorconfig
.gitattributes
.gitignore Initial commit Aug 23, 2018
.scrutinizer.yml Initial commit Aug 23, 2018
.styleci.yml Initial commit Aug 23, 2018
CHANGELOG.md
CONTRIBUTING.md Initial commit Aug 23, 2018
LICENSE.md Initial commit Aug 23, 2018
README.md
composer.json Initial commit Aug 23, 2018
package.json Initial commit Aug 23, 2018
webpack.mix.js
yarn.lock Initial commit Aug 23, 2018

README.md

Nova Algolia Cards

Latest Version on Packagist Total Downloads

Get some insight on your Algolia indexing with this easy to use Nova card.

nova-algolia-card

Installation

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

composer require nicolasbeauvais/nova-algolia-card

Next up, you must register the card Nova. This is typically done in the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvider.php

// ...

public function cards()
{
    return [
        // ...
        new \NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCard,
    ];
}

Config

If you are already using Laravel Scout everything is already configured.

If not, you must create a config/scout.php file with the following content:

<?php

return [
    'algolia' => [
        'id' => env('ALGOLIA_APP_ID', ''),
        'secret' => env('ALGOLIA_SECRET', ''),
    ],
];

Usage

By default the card will show the total number of records across all your Algolia indexes. You can specify an index name to the card to show it's number of records:

// in app/Nova/User.php

// ...

public function cards()
{
    return [
        new \NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCard((new \App\User)->searchableAs()),
        // or
        new \NicolasBeauvais\NovaAlgoliaCard\NovaAlgoliaCard('my_user_index'),
    ];
}

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email nicolasbeauvais1@gmail.com instead of using the issue tracker.

Credits

License

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

You can’t perform that action at this time.