PHP code example of codersvn / activity_logger

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

    

codersvn / activity_logger example snippets


'providers' => [
    
    /*
     * Laravel Framework Service Providers...
     */
    Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
    Illuminate\Auth\AuthServiceProvider::class,
    ...
    
    /**
     * Third Party Service Providers...
     */
    Vicoders\ActivityLog\Providers\ActivityLogServiceProvider::class,

],



namespace VCComponent\Laravel\User\Events;

use Illuminate\Queue\SerializesModels;
use Vicoders\ActivityLog\Contracts\ActivityLogable;

class UserRegisteredEvent implements ActivityLogable
{
    use SerializesModels;

    public $user;

    /**
     * Create a new event instance.
     *
     * @return void
     */
    public function __construct($user)
    {
        $this->user = $user;
    }

    public function getMeta() {
        return $this->user->id;
    };
    public function getMetaType() {
        return 'user_id';
    };
}