1 | <?php |
||
29 | class Allocation extends Model |
||
30 | { |
||
31 | /** |
||
32 | * The table associated with the model. |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $table = 'allocations'; |
||
37 | |||
38 | /** |
||
39 | * Fields that are not mass assignable. |
||
40 | * |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $guarded = ['id', 'created_at', 'updated_at']; |
||
44 | |||
45 | /** |
||
46 | * Cast values to correct type. |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $casts = [ |
||
51 | 'node_id' => 'integer', |
||
52 | 'port' => 'integer', |
||
53 | 'server_id' => 'integer', |
||
54 | ]; |
||
55 | |||
56 | /** |
||
57 | * Accessor to automatically provide the IP alias if defined. |
||
58 | * |
||
59 | * @param null|string $value |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getAliasAttribute($value) |
||
66 | |||
67 | /** |
||
68 | * Accessor to quickly determine if this allocation has an alias. |
||
69 | * |
||
70 | * @param null|string $value |
||
71 | * @return boolean |
||
72 | */ |
||
73 | public function getHasAliasAttribute($value) |
||
77 | } |
||
78 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.