ingoldsby / laravel-dashboard-shopify-tile

A Shopify tile for Laravel Dashboard

Stars
0

A tile to display Shopify information

Latest Version on Packagist
Total Downloads

This tile can be used on the Laravel Dashboard to display Shopify information.

screenshot

Installation

You can install the package via composer:

composer require ingoldsby/laravel-dashboard-shopify-tile

Shopify API credentials

Before using this tile you need to have created a private app on the Shopify admin page and obtained an API key and password.

Usage

In the dashboard config file, you must add this configuration in the tiles key.

// in config/dashboard.php

return [
    // ...
    'tiles' => [
        'shopify' => [
            'store' => env('SHOPIFY_STORE'),
            'api_version' => '2020-04',
            'api_key' => env('SHOPIFY_API_KEY'),
            'password' => env('SHOPIFY_API_PASSWORD'),
        ]
    ],
];

In app\Console\Kernel.php you should schedule the \Ingoldsby\ShopifyTile\Commands\FetchShopifyInfoCommand to run. You can let it run every minute if you want. You could also run this less frequently if fast updates on the dashboard aren’t that important for this tile.

// in app/console/Kernel.php

protected function schedule(Schedule $schedule)
{
    // ...
    $schedule->command(\Ingoldsby\ShopifyTile\Commands\FetchShopifyInfoCommand::class)->everyMinute();
}

In your dashboard view you can use the tile:

  • livewire:shopify-tile
<x-dashboard>
    <livewire:shopify-tile position="a1:b4" />
</x-dashboard>

Testing

composer test

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 instead of using the issue tracker.

Support Spatie

I have learnt a lot from Spatie's various packages, including Mailcoach, and would recommend you check them out if you want to know more.

Learn how to create a package like theirs, by watching Spatie's premium video course:

Laravel Package training

Spatie invest a lot of resources into creating best in class open source packages. You can support them by buying one of their paid products.

Credits

License

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