1 | <?php namespace jlourenco\support\Database; |
||
9 | class Blueprint extends IlluminateBlueprint { |
||
10 | |||
11 | /** |
||
12 | * Create a new binary column on the table. |
||
13 | * |
||
14 | * @param string $column |
||
15 | * @param int $length |
||
16 | * @return \Illuminate\Support\Fluent |
||
17 | */ |
||
18 | public function binary($column, $length = 255) |
||
22 | |||
23 | /** |
||
24 | * Add creation and update user information to the table. |
||
25 | * |
||
26 | * @return void |
||
27 | */ |
||
28 | public function creation() |
||
34 | |||
35 | public function creationRelation() |
||
41 | |||
42 | /** |
||
43 | * Create a new 'set' column on the table. |
||
44 | * |
||
45 | * @param string $column |
||
46 | * @param array $allowed |
||
47 | * @return \Illuminate\Support\Fluent |
||
48 | */ |
||
49 | public function set($column, array $allowed) |
||
53 | |||
54 | /** |
||
55 | * Specify a unique index for the table. |
||
56 | * |
||
57 | * @param string|array $columns |
||
58 | * @param string $name |
||
59 | * @param int $length |
||
60 | * @return \Illuminate\Support\Fluent |
||
61 | */ |
||
62 | public function unique($columns, $name = null, $length = null) |
||
66 | |||
67 | /** |
||
68 | * Specify an index for the table. |
||
69 | * |
||
70 | * @param string|array $columns |
||
71 | * @param string $name |
||
72 | * @param int $length |
||
73 | * @return \Illuminate\Support\Fluent |
||
74 | */ |
||
75 | public function index($columns, $name = null, $length = null) |
||
79 | |||
80 | /** |
||
81 | * Determine if the given table exists. |
||
82 | * |
||
83 | * @param string $table |
||
84 | * |
||
85 | * @return bool |
||
86 | */ |
||
87 | public function hasForeign($table, $foreign) |
||
93 | |||
94 | /** |
||
95 | * Add a new index command to the blueprint. |
||
96 | * |
||
97 | * @param string $type |
||
98 | * @param string|array $columns |
||
99 | * @param string $index |
||
100 | * @param int $length |
||
101 | * @return \Illuminate\Support\Fluent |
||
102 | */ |
||
103 | protected function indexCommand($type, $columns, $index, $length = null) |
||
113 | |||
114 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: