PHP code example of repat / laravel-database-session-model

1. Go to this page and download the library: Download repat/laravel-database-session-model 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/ */

    

repat / laravel-database-session-model example snippets


$session = \Repat\LaravelSessions\Session::first();

// UUID
$session->id; // string

// User
$session->user_id;
$session->user; // App\Models\User, extend the relationship if you have a different FQCN

$session->ip_address; // string
$session->user_agent; // string

// Attributes
$session->unserialized_payload; // array
$session->last_activity_at; // \Carbon\Carbon