@@ -14,7 +14,7 @@ class ResourceRegistrar extends BaseResourceRegistrar
14
14
*
15
15
* @var string[]
16
16
*/
17
- protected $ resourceDefaults = ['search ' , 'mutate ' , 'actions ' , 'operate ' , 'destroy ' , 'restore ' , 'forceDelete ' ];
17
+ protected $ resourceDefaults = ['detail ' , 'search ' , 'mutate ' , 'operate ' , 'destroy ' , 'restore ' , 'forceDelete ' ];
18
18
19
19
/**
20
20
* The verbs used in the resource URIs.
@@ -30,63 +30,63 @@ class ResourceRegistrar extends BaseResourceRegistrar
30
30
];
31
31
32
32
/**
33
- * Add the search method for a resourceful route.
33
+ * Add the detail method for a resourceful route.
34
34
*
35
35
* @param string $name
36
36
* @param string $base
37
37
* @param string $controller
38
38
* @param array $options
39
39
* @return \Illuminate\Routing\Route
40
40
*/
41
- protected function addResourceSearch ($ name , $ base , $ controller , $ options )
41
+ protected function addResourceDetail ($ name , $ base , $ controller , $ options )
42
42
{
43
- $ uri = $ this ->getResourceUri ($ name ). ' / ' . static :: $ verbs [ ' search ' ] ;
43
+ $ uri = $ this ->getResourceUri ($ name );
44
44
45
45
unset($ options ['missing ' ]);
46
46
47
- $ action = $ this ->getResourceAction ($ name , $ controller , 'search ' , $ options );
47
+ $ action = $ this ->getResourceAction ($ name , $ controller , 'detail ' , $ options );
48
48
49
- return $ this ->router ->post ($ uri , $ action );
49
+ return $ this ->router ->get ($ uri , $ action );
50
50
}
51
51
52
52
/**
53
- * Add the mutate method for a resourceful route.
53
+ * Add the search method for a resourceful route.
54
54
*
55
55
* @param string $name
56
56
* @param string $base
57
57
* @param string $controller
58
58
* @param array $options
59
59
* @return \Illuminate\Routing\Route
60
60
*/
61
- protected function addResourceMutate ($ name , $ base , $ controller , $ options )
61
+ protected function addResourceSearch ($ name , $ base , $ controller , $ options )
62
62
{
63
- $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['mutate ' ];
63
+ $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['search ' ];
64
64
65
65
unset($ options ['missing ' ]);
66
66
67
- $ action = $ this ->getResourceAction ($ name , $ controller , 'mutate ' , $ options );
67
+ $ action = $ this ->getResourceAction ($ name , $ controller , 'search ' , $ options );
68
68
69
69
return $ this ->router ->post ($ uri , $ action );
70
70
}
71
71
72
72
/**
73
- * Add the actions method for a resourceful route.
73
+ * Add the mutate method for a resourceful route.
74
74
*
75
75
* @param string $name
76
76
* @param string $base
77
77
* @param string $controller
78
78
* @param array $options
79
79
* @return \Illuminate\Routing\Route
80
80
*/
81
- protected function addResourceActions ($ name , $ base , $ controller , $ options )
81
+ protected function addResourceMutate ($ name , $ base , $ controller , $ options )
82
82
{
83
- $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['actions ' ];
83
+ $ uri = $ this ->getResourceUri ($ name ).'/ ' .static ::$ verbs ['mutate ' ];
84
84
85
85
unset($ options ['missing ' ]);
86
86
87
- $ action = $ this ->getResourceAction ($ name , $ controller , 'actions ' , $ options );
87
+ $ action = $ this ->getResourceAction ($ name , $ controller , 'mutate ' , $ options );
88
88
89
- return $ this ->router ->get ($ uri , $ action );
89
+ return $ this ->router ->post ($ uri , $ action );
90
90
}
91
91
92
92
/**
0 commit comments