@@ -20,13 +20,6 @@ class ResourceRegistrar
20
20
*/
21
21
protected $ resourceDefaults = ['index ' , 'create ' , 'store ' , 'show ' , 'edit ' , 'update ' , 'destroy ' ];
22
22
23
- /**
24
- * Actions that use model binding.
25
- *
26
- * @var string[]
27
- */
28
- protected $ modelBoundMethods = ['show ' , 'edit ' , 'update ' , 'destroy ' ];
29
-
30
23
/**
31
24
* The parameters set for this resource instance.
32
25
*
@@ -191,6 +184,8 @@ protected function addResourceIndex($name, $base, $controller, $options)
191
184
{
192
185
$ uri = $ this ->getResourceUri ($ name );
193
186
187
+ unset($ options ['missing ' ]);
188
+
194
189
$ action = $ this ->getResourceAction ($ name , $ controller , 'index ' , $ options );
195
190
196
191
return $ this ->router ->get ($ uri , $ action );
@@ -209,6 +204,8 @@ protected function addResourceCreate($name, $base, $controller, $options)
209
204
{
210
205
$ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['create ' ];
211
206
207
+ unset($ options ['missing ' ]);
208
+
212
209
$ action = $ this ->getResourceAction ($ name , $ controller , 'create ' , $ options );
213
210
214
211
return $ this ->router ->get ($ uri , $ action );
@@ -227,6 +224,8 @@ protected function addResourceStore($name, $base, $controller, $options)
227
224
{
228
225
$ uri = $ this ->getResourceUri ($ name );
229
226
227
+ unset($ options ['missing ' ]);
228
+
230
229
$ action = $ this ->getResourceAction ($ name , $ controller , 'store ' , $ options );
231
230
232
231
return $ this ->router ->post ($ uri , $ action );
@@ -428,7 +427,7 @@ protected function getResourceAction($resource, $controller, $method, $options)
428
427
$ action ['where ' ] = $ options ['wheres ' ];
429
428
}
430
429
431
- if (isset ($ options ['missing ' ]) && in_array ( $ method , $ this -> modelBoundMethods ) ) {
430
+ if (isset ($ options ['missing ' ])) {
432
431
$ action ['missing ' ] = $ options ['missing ' ];
433
432
}
434
433
0 commit comments