-
Notifications
You must be signed in to change notification settings - Fork 4
/
Log.php
86 lines (74 loc) · 1.73 KB
/
Log.php
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php namespace App;
use Illuminate\Database\Eloquent\Model;
class Log extends Model {
protected $table = 'log';
// public $incrementing = false;
// public $timestamps = false;
// protected $guarded = ['id', 'account_id'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable =[
'users_id',
'group_id',
'arr_id',
'table',
'table_id',
'action_name',
'catatan'
];
public $kolom =[
'users_email',
'groups_name',
// 'arr_id',
'table',
// 'table_id',
'action_name',
'catatan'
];
// public $kolom;
// public $kolom=[
// // 'A'=> 'required',
// // 'B'=> 'required|digits:4',
// // 'C'=> 'required|digits_between:1,5',
// // 'D'=> 'required|digits_between:1,5',
// // 'E'=> 'required|digits_between:1,255'
// ];
private $rulesXX = array(
'color' => 'required|alpha|min:3',
'size' => 'required',
// .. more rules here ..
);
private $rules = array(
/*Sebenarnyaaa ==============================================================*/
'users_id'=> 'required',
'groups_id'=> 'required',
'arr_id'=> 'required',
'table'=> 'required',
'action_name'=> 'required',
'catatan'=> 'required'
);
public function __Construct()
{
// $this->kolom=$this->fillable;
parent::__Construct();
}
public function users()
{
return $this->belongsTo('App\user');
}
public function groups()
{
return $this->belongsTo('App\Group');
}
// public function validate($data)
// {
// // make a new validator object
// $v = \Validator::make($data, $this->rules);
// // return the result
// return $v;
// // return $v->passes();
// }
}