PHP code example of mrunknown0001 / laravel-login-monitor

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

    

mrunknown0001 / laravel-login-monitor example snippets


use Mrunknown0001\LaravelLoginMonitor\Facades\LoginMonitor;

LoginMonitor::sendBeacon([
    'event' => 'custom_event',
    'data' => 'your custom data',
]);

use Mrunknown0001\LaravelLoginMonitor\Facades\LoginMonitor;

/** @var \Illuminate\Database\Eloquent\Model $model */
LoginMonitor::recordCreated($model);

// For non-model contexts (jobs, scripts) using the query builder:
LoginMonitor::recordQueryBuilderOperation('update', [
    'table' => 'orders',
    'record_id' => 42,
    'changes' => ['status' => 'shipped'],
]);
bash
php artisan vendor:publish --tag=login-monitor-config