| 1 | <?php namespace VojtaSvoboda\UserAccessLog\Models; |
||
| 10 | class AccessLog extends Model |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string The database table used by the model. |
||
| 14 | */ |
||
| 15 | protected $table = 'user_access_log'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array Relations |
||
| 19 | */ |
||
| 20 | public $belongsTo = [ |
||
| 21 | 'user' => [User::class], |
||
| 22 | ]; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Creates a log record. |
||
| 26 | * |
||
| 27 | * @param User $user Front-end user |
||
| 28 | * @return self |
||
| 29 | */ |
||
| 30 | public static function add($user) |
||
| 39 | } |
||
| 40 |