@@ -44,9 +44,11 @@ public function __construct(Connection $connection, $collection)
44
44
*
45
45
* @param string|array $columns
46
46
* @param array $options
47
+ * @param string $name
48
+ * @param string|null $algorithm
47
49
* @return Blueprint
48
50
*/
49
- public function index ($ columns = null , $ options = [])
51
+ public function index ($ columns = null , $ name = null , $ algorithm = null , $ options = [])
50
52
{
51
53
$ columns = $ this ->fluent ($ columns );
52
54
@@ -71,10 +73,12 @@ public function index($columns = null, $options = [])
71
73
* Specify the primary key(s) for the table.
72
74
*
73
75
* @param string|array $columns
76
+ * @param string $name
77
+ * @param string|null $algorithm
74
78
* @param array $options
75
79
* @return \Illuminate\Support\Fluent
76
80
*/
77
- public function primary ($ columns = null , $ options = [])
81
+ public function primary ($ columns = null , $ name = null , $ algorithm = null , $ options = [])
78
82
{
79
83
return $ this ->unique ($ columns , $ options );
80
84
}
@@ -112,16 +116,18 @@ public function dropIndex($columns = null)
112
116
* Specify a unique index for the collection.
113
117
*
114
118
* @param string|array $columns
119
+ * @param string $name
120
+ * @param string|null $algorithm
115
121
* @param array $options
116
122
* @return Blueprint
117
123
*/
118
- public function unique ($ columns = null , $ options = [])
124
+ public function unique ($ columns = null , $ name = null , $ algorithm = null , $ options = [])
119
125
{
120
126
$ columns = $ this ->fluent ($ columns );
121
127
122
128
$ options ['unique ' ] = true ;
123
129
124
- $ this ->index ($ columns , $ options );
130
+ $ this ->index ($ columns , null , null , $ options );
125
131
126
132
return $ this ;
127
133
}
@@ -136,7 +142,7 @@ public function background($columns = null)
136
142
{
137
143
$ columns = $ this ->fluent ($ columns );
138
144
139
- $ this ->index ($ columns , ['background ' => true ]);
145
+ $ this ->index ($ columns , null , null , ['background ' => true ]);
140
146
141
147
return $ this ;
142
148
}
@@ -154,7 +160,7 @@ public function sparse($columns = null, $options = [])
154
160
155
161
$ options ['sparse ' ] = true ;
156
162
157
- $ this ->index ($ columns , $ options );
163
+ $ this ->index ($ columns , null , null , $ options );
158
164
159
165
return $ this ;
160
166
}
@@ -171,7 +177,7 @@ public function expire($columns, $seconds)
171
177
{
172
178
$ columns = $ this ->fluent ($ columns );
173
179
174
- $ this ->index ($ columns , ['expireAfterSeconds ' => $ seconds ]);
180
+ $ this ->index ($ columns , null , null , ['expireAfterSeconds ' => $ seconds ]);
175
181
176
182
return $ this ;
177
183
}
0 commit comments