Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
TrackingExtension | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
boot | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
shortcut | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace App\Http\Models; |
4 | |
5 | use App\Http\Scopes\UserScope; |
6 | |
7 | class TrackingExtension extends Moloquent |
8 | { |
9 | protected $table = 'tracking_extension'; |
10 | |
11 | protected $fillable = [ |
12 | 'user_id', |
13 | 'shortcut_id', |
14 | 'tag', |
15 | 'value', |
16 | ]; |
17 | |
18 | protected $casts = [ |
19 | 'user_id' => 'string', |
20 | 'shortcut_id' => 'string', |
21 | 'tag' => 'string', |
22 | 'value' => 'string', |
23 | ]; |
24 | |
25 | protected static function boot() |
26 | { |
27 | parent::boot(); |
28 | static::addGlobalScope(new UserScope); |
29 | } |
30 | |
31 | public function shortcut() |
32 | { |
33 | return $this->belongsTo(Shortcut::class, 'shortcut_id'); |
34 | } |
35 | } |