PHP code example of digikraaft / laravel-dashboard-stripe-payments-tile

1. Go to this page and download the library: Download digikraaft/laravel-dashboard-stripe-payments-tile 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/ */

    

digikraaft / laravel-dashboard-stripe-payments-tile example snippets


// in config/dashboard.php

'tiles' => [

        /**
         * Stripe configuration settings
         */
        'stripe' => [

            'secret_key' => env('STRIPE_SECRET'),
            'payments' => [

                /**
                 * the values here must be supported by the Stripe API
                 * @link https://stripe.com/docs/api/charges?lang=php
                 */
                'params' => [
                    'limit' => 5,
                ],

                /**
                 * How often should the data be refreshed in seconds
                 */
                'refresh_interval_in_seconds' => 1800,
            ],
        ],
    ],

// in app/Console/Kernel.php
use Digikraaft\StripePaymentsTile\FetchPaymentsDataFromStripeApi;

protected function schedule(Schedule $schedule)
{
    $schedule->command(FetchPaymentsDataFromStripeApi::class)->twiceDaily();
}