zgabievi/nova-promocodes

A Laravel Nova tool.

9.0.1 2022-03-15 11:11 UTC

This package is auto-updated.

Last update: 2024-12-15 17:02:50 UTC


README

#StandWithUkraine nova-promocodes

nova-promocodes

Packagist Packagist license

Coupons and promotional codes generator for Laravel Nova. This package is created for zgabievi/laravel-promocodes.

Installation

You can install the package via composer:

composer require zgabievi/nova-promocodes

Configuration

php artisan vendor:publish --provider="Zorb\NovaPromocodes\ToolServiceProvider"

Now you can change configurations as you need:

return [
    'models' => [
        'promocodes' => [
            'resource' => \Zorb\NovaPromocodes\Resources\Promocode::class,
        ],

        'users' => [
            'resource' => \App\Nova\User::class,
        ],
    ],
];

After you configure this file, run migrations:

php artisan migrate

Usage

It's very easy to use. Methods are combined, so that you can configure promocodes easily.

Reference

Include Tool

Include promocodes tool inside nova service provider.

use Zorb\NovaPromocodes\PromocodesTool;

class NovaServiceProvider extends NovaApplicationServiceProvider
{
    // ...

    /**
     * Get the tools that should be listed in the Nova sidebar.
     *
     * @return array
     */
    public function tools()
    {
        return [
            PromocodesTool::make(),
        ];
    }
}

Parent Package

For more information about parent package, visit zgabievi/laravel-promocodes.

Contributing

Please see CONTRIBUTING for details.

Credits

License

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