1 | <?php namespace Arcanedev\LaravelTracker\Models; |
||
19 | class Device extends AbstractModel implements DeviceContract |
||
20 | { |
||
21 | /* ----------------------------------------------------------------- |
||
22 | | Properties |
||
23 | | ----------------------------------------------------------------- |
||
24 | */ |
||
25 | |||
26 | /** |
||
27 | * The table associated with the model. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $table = 'devices'; |
||
32 | |||
33 | /** |
||
34 | * The attributes that are mass assignable. |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $fillable = [ |
||
39 | 'kind', |
||
40 | 'model', |
||
41 | 'platform', |
||
42 | 'platform_version', |
||
43 | ]; |
||
44 | |||
45 | /** |
||
46 | * The attributes that should be cast to native types. |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $casts = [ |
||
51 | 'id' => 'integer', |
||
52 | ]; |
||
53 | |||
54 | /* ----------------------------------------------------------------- |
||
55 | | Check Methods |
||
56 | | ----------------------------------------------------------------- |
||
57 | */ |
||
58 | |||
59 | /** |
||
60 | * Is this a computer? |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function isComputer() |
||
68 | |||
69 | /** |
||
70 | * Is this a phone? |
||
71 | * |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function isPhone() |
||
78 | |||
79 | /** |
||
80 | * Is this a tablet? |
||
81 | * |
||
82 | * @return bool |
||
83 | */ |
||
84 | public function isTablet() |
||
88 | } |
||
89 |