ingoldsby/laravel-dashboard-shopify-tile

A Shopify tile for Laravel Dashboard

2.0.0 2022-11-12 10:38 UTC

This package is auto-updated.

Last update: 2024-11-12 15:13:07 UTC


README

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' => env('SHOPIFY_API_VERSION'),
            '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 use the livewire:shopify-tile component.

<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.