PHP code example of jobmetric / laravel-event-system

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

    

jobmetric / laravel-event-system example snippets


return [

    "cache_time" => env("EVENT_SYSTEM_CACHE_TIME", 60),

    "cache_key" => env("EVENT_SYSTEM_CACHE_KEY", "event_system_cache"),

    "tables" => [
        'event' => 'events',
    ],
];

addEventSystem('user.created', App\Events\UserCreated::class, App\Listeners\SendWelcomeEmail::class, 'Triggered when a new user registers');

removeEventSystem('user.created');
bash
php artisan migrate
bash
php artisan vendor:publish --tag=event-system-config