@@ -14,7 +14,7 @@ class ResourceRegistrar extends BaseResourceRegistrar
1414 *
1515 * @var string[]
1616 */
17- protected $ resourceDefaults = ['search ' , 'mutate ' , 'actions ' , 'operate ' , 'destroy ' , 'restore ' , 'forceDelete ' ];
17+ protected $ resourceDefaults = ['detail ' , 'search ' , 'mutate ' , 'operate ' , 'destroy ' , 'restore ' , 'forceDelete ' ];
1818
1919 /**
2020 * The verbs used in the resource URIs.
@@ -30,63 +30,63 @@ class ResourceRegistrar extends BaseResourceRegistrar
3030 ];
3131
3232 /**
33- * Add the search method for a resourceful route.
33+ * Add the detail method for a resourceful route.
3434 *
3535 * @param string $name
3636 * @param string $base
3737 * @param string $controller
3838 * @param array $options
3939 * @return \Illuminate\Routing\Route
4040 */
41- protected function addResourceSearch ($ name , $ base , $ controller , $ options )
41+ protected function addResourceDetail ($ name , $ base , $ controller , $ options )
4242 {
43- $ uri = $ this ->getResourceUri ($ name ). ' / ' . static :: $ verbs [ ' search ' ] ;
43+ $ uri = $ this ->getResourceUri ($ name );
4444
4545 unset($ options ['missing ' ]);
4646
47- $ action = $ this ->getResourceAction ($ name , $ controller , 'search ' , $ options );
47+ $ action = $ this ->getResourceAction ($ name , $ controller , 'detail ' , $ options );
4848
49- return $ this ->router ->post ($ uri , $ action );
49+ return $ this ->router ->get ($ uri , $ action );
5050 }
5151
5252 /**
53- * Add the mutate method for a resourceful route.
53+ * Add the search method for a resourceful route.
5454 *
5555 * @param string $name
5656 * @param string $base
5757 * @param string $controller
5858 * @param array $options
5959 * @return \Illuminate\Routing\Route
6060 */
61- protected function addResourceMutate ($ name , $ base , $ controller , $ options )
61+ protected function addResourceSearch ($ name , $ base , $ controller , $ options )
6262 {
63- $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['mutate ' ];
63+ $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['search ' ];
6464
6565 unset($ options ['missing ' ]);
6666
67- $ action = $ this ->getResourceAction ($ name , $ controller , 'mutate ' , $ options );
67+ $ action = $ this ->getResourceAction ($ name , $ controller , 'search ' , $ options );
6868
6969 return $ this ->router ->post ($ uri , $ action );
7070 }
7171
7272 /**
73- * Add the actions method for a resourceful route.
73+ * Add the mutate method for a resourceful route.
7474 *
7575 * @param string $name
7676 * @param string $base
7777 * @param string $controller
7878 * @param array $options
7979 * @return \Illuminate\Routing\Route
8080 */
81- protected function addResourceActions ($ name , $ base , $ controller , $ options )
81+ protected function addResourceMutate ($ name , $ base , $ controller , $ options )
8282 {
83- $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['actions ' ];
83+ $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['mutate ' ];
8484
8585 unset($ options ['missing ' ]);
8686
87- $ action = $ this ->getResourceAction ($ name , $ controller , 'actions ' , $ options );
87+ $ action = $ this ->getResourceAction ($ name , $ controller , 'mutate ' , $ options );
8888
89- return $ this ->router ->get ($ uri , $ action );
89+ return $ this ->router ->post ($ uri , $ action );
9090 }
9191
9292 /**
0 commit comments