承接 repat/laravel-database-session-model 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

repat/laravel-database-session-model

最新稳定版本:0.5

Composer 安装命令:

composer require repat/laravel-database-session-model

包简介

Eloquent Model for the sessions table as created by artisan session:table

README 文档

README

Latest Version on Packagist Total Downloads

laravel-database-session-model contains an Eloquent model for the sesssions (or config('sessions.table')) as created by the artisan commands sessions:table

Installation

$ composer require repat/laravel-database-session-model

Documentation

Relationship / Attributes

The attribute unserialized_payload returns the payload array, unserialized and base64 decoded. For more information, see the Laravel Documentation on Eloquent Mutators.

The attribute last_activity_at parses the last_activity as a UNIX timestamp.

If you've kept the standard FQCN for Laravels User Model (\App\Model\User::class) you can use the ->user relationship or extend this model and override the user() method.

$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

License

Version

  • Version 0.5

Contact

repat

Flattr this git repo

统计信息

  • 总下载量: 11.41k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-08