1 | <?php namespace Arcanedev\LaravelTracker\Models; |
||
30 | class SessionActivity extends Model |
||
31 | { |
||
32 | /* ------------------------------------------------------------------------------------------------ |
||
33 | | Properties |
||
34 | | ------------------------------------------------------------------------------------------------ |
||
35 | */ |
||
36 | /** |
||
37 | * The table associated with the model. |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $table = 'session_activities'; |
||
42 | |||
43 | /** |
||
44 | * The attributes that are mass assignable. |
||
45 | * |
||
46 | * @var array |
||
47 | */ |
||
48 | protected $fillable = [ |
||
49 | 'session_id', |
||
50 | 'path_id', |
||
51 | 'query_id', |
||
52 | 'referrer_id', |
||
53 | 'method', |
||
54 | 'route_path_id', |
||
55 | 'is_ajax', |
||
56 | 'is_secure', |
||
57 | 'is_json', |
||
58 | 'wants_json', |
||
59 | 'error_id', |
||
60 | ]; |
||
61 | |||
62 | /** |
||
63 | * The attributes that should be cast to native types. |
||
64 | * |
||
65 | * @var array |
||
66 | */ |
||
67 | protected $casts = [ |
||
68 | 'id' => 'integer', |
||
69 | 'session_id' => 'integer', |
||
70 | 'path_id' => 'integer', |
||
71 | 'query_id' => 'integer', |
||
72 | 'referrer_id' => 'integer', |
||
73 | 'route_path_id' => 'integer', |
||
74 | 'is_ajax' => 'boolean', |
||
75 | 'is_secure' => 'boolean', |
||
76 | 'is_json' => 'boolean', |
||
77 | 'wants_json' => 'boolean', |
||
78 | 'error_id' => 'integer', |
||
79 | ]; |
||
80 | |||
81 | /* ------------------------------------------------------------------------------------------------ |
||
82 | | Relationships |
||
83 | | ------------------------------------------------------------------------------------------------ |
||
84 | */ |
||
85 | /** |
||
86 | * Session relationship. |
||
87 | * |
||
88 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
89 | */ |
||
90 | public function session() |
||
96 | |||
97 | /** |
||
98 | * Path relationship. |
||
99 | * |
||
100 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
101 | */ |
||
102 | public function path() |
||
108 | |||
109 | /** |
||
110 | * Query relationship. |
||
111 | * |
||
112 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
113 | */ |
||
114 | public function queryRel() |
||
120 | |||
121 | /** |
||
122 | * Referrer relationship. |
||
123 | * |
||
124 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
125 | */ |
||
126 | public function referrer() |
||
132 | |||
133 | /** |
||
134 | * Error relationship. |
||
135 | * |
||
136 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
137 | */ |
||
138 | public function error() |
||
144 | } |
||
145 |