PHP code example of sustainable-hustle / astrel-laravel

1. Go to this page and download the library: Download sustainable-hustle/astrel-laravel 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/ */

    

sustainable-hustle / astrel-laravel example snippets


// routes/web.php
use SustainableHustle\Astrel\Facades\Astrel;
Astrel::webhookRoute('astrel/webhook');

// Make sure CSRF verification is disabled on that route.
class VerifyCsrfToken extends Middleware
{
    protected $except = [
        '/astrel/webhook',
    ];
}

astrel_env('my-slug');                           // Equivalent to astrel('my-slug', env('MY_SLUG'));
astrel_env('my-slug', 'MY_ENV_SLUG');            // Equivalent to astrel('my-slug', env('MY_ENV_SLUG'));
astrel_env('my-slug', 'MY_ENV_SLUG', 'default'); // Equivalent to astrel('my-slug', env('MY_ENV_SLUG', 'default'));
bash
php artisan vendor:publish --tag="astrel-config"