You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.2 KiB
PHTML

2 years ago
<?php
namespace App\Models;
class Visitor extends BaseModel
{
protected $table = 'visitor';
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'lo_ip', 'lo_date', 'lo_timealue', 'lo_week',
'lo_agent', 'lo_referer', 'lo_device'
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
];
protected $visible = [
'lo_ip', 'lo_date', 'lo_time', 'lo_week',
'lo_agent', 'lo_referer', 'lo_device'
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
];
/**
* 방문로그 저장
* param : Array $data
* return : Void
*/
public static function add($data)
{
return self::query()->create([
'lo_ip' => $data['lo_ip'],
'lo_date' => $data['lo_date'],
'lo_time' => $data['lo_time'],
'lo_week' => $data['lo_week'],
'lo_agent' => $data['lo_agent'],
'lo_referer' => $data['lo_referer'],
'lo_device' => $data['lo_device']
]);
}
}