Total Complexity | 1 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
4 | class Session extends Model |
||
5 | { |
||
6 | |||
7 | /** |
||
8 | * The attributes that are mass assignable. |
||
9 | * |
||
10 | * @var array |
||
11 | */ |
||
12 | protected $fillable = [ |
||
13 | 'user_id', |
||
14 | 'ip_address', |
||
15 | 'user_agent', |
||
16 | 'payload', |
||
17 | 'last_activity', |
||
18 | 'url', |
||
19 | 'method' |
||
20 | ]; |
||
21 | |||
22 | /** |
||
23 | * Scope a query to only include non expired session. |
||
24 | * |
||
25 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
26 | * @return \Illuminate\Database\Eloquent\Builder |
||
27 | */ |
||
28 | public function scopeExpires($query) |
||
36 |