PHP code example of orlyapps / laravel-event-tracking

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

    

orlyapps / laravel-event-tracking example snippets


// User.php
class User extends Authenticatable
{
    use HasEventTracking;
}

// api.php
LaravelEventTracking::routes();

$user->track('first_login', ['my-meta-key' => 'my meta value'])