PHP code example of laravel-afterburner / playbook

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

    

laravel-afterburner / playbook example snippets


use Afterburner\Playbook\Support\Playbook;

// In your ServiceProvider::boot()
if (class_exists(Playbook::class)) {
    Playbook::register([
        'key' => 'meetings',
        'label' => 'Meetings',
        'order' => 20,
        'path' => __DIR__.'/../../playbook',
        'enabled' => fn () => config('afterburner-meetings.enabled', true),
        'permission' => fn ($user) => $user?->can('viewAny', Meeting::class) ?? false,
    ]);
}

// Entity menu link (order > Subscriptions' 15, default placement):
TeamNavigation::register([
    'label' => 'Help & Support',
    'route' => 'playbook.index',
    'order' => 20,
    ...
]);
bash
php artisan migrate
bash
php artisan playbook:validate