1 | <?php |
||
6 | class ActivityLog extends AbstractEntity |
||
7 | { |
||
8 | const CREATED = 'created'; |
||
9 | const UPDATED = 'updated'; |
||
10 | const DELETED = 'deleted'; |
||
11 | const VIEW = 'view'; |
||
12 | const LOGIN = 'login'; |
||
13 | const LOGOUT = 'logout'; |
||
14 | const EXECUTED = 'executed'; |
||
15 | const SEND = 'send'; |
||
16 | const UPLOAD = 'upload'; |
||
17 | const DOWNLOAD = 'download'; |
||
18 | const INFO = 'info'; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $table = "activity_log"; |
||
24 | |||
25 | /** |
||
26 | * The attributes that are mass assignable. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $fillable = [ |
||
31 | 'action', |
||
32 | 'user_id', |
||
33 | 'user_type', |
||
34 | 'description', |
||
35 | 'details', |
||
36 | 'ip_address', |
||
37 | 'content_type', |
||
38 | 'content_id', |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $columns = [ |
||
45 | 'action', |
||
46 | 'user_id', |
||
47 | 'user_type', |
||
48 | 'description', |
||
49 | 'details', |
||
50 | 'ip_address', |
||
51 | 'content_type', |
||
52 | 'content_id', |
||
53 | 'created_at', |
||
54 | 'updated_at', |
||
55 | ]; |
||
56 | |||
57 | /** |
||
58 | * Get the icon class name for the log entry's action. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | 13 | public function getIcon() |
|
74 | |||
75 | /** |
||
76 | * Get the markup for the log entry's icon. |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | 13 | public function getIconMarkup() |
|
87 | } |
||
88 |