PHP code example of zgabievi / nova-promocodes

1. Go to this page and download the library: Download zgabievi/nova-promocodes library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zgabievi / nova-promocodes example snippets


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

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

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(),
        ];
    }
}
bash
php artisan vendor:publish --provider="Zorb\NovaPromocodes\ToolServiceProvider"
bash
php artisan migrate