QueryLog.php
1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace Daito\Lib\QueryLog\Models;
use Illuminate\Database\Eloquent\Model;
class QueryLog extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'log_queries';
/**
* The primary key for the model.
*
* @var string
*/
protected $primaryKey = 'id';
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = true;
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $timestamps = false;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'action',
'query',
'query_type',
'query_time',
'query_at',
'query_order',
'connection',
'ip',
'user_id',
'is_screen',
];
protected $connection = 'query_log';
public function __construct(array $arrAttributes = array())
{
parent::__construct($arrAttributes);
$this->setConnection(config('query_log.connection', 'query_log'));
$this->setTable(config('query_log.table', 'log_queries'));
}
}