PHP code example of slavcodev / laravel-event-recorder

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

    

slavcodev / laravel-event-recorder example snippets


class User extends \Illuminate\Database\Eloquent\Model
{
    use \Slavcodev\Laravel\Events\EventRecorder;
    
    public function someModifications()
    {
        $this->recordEvent(new UserChanged());
    }
}