I now have a link of this type: www. xxx. comapisignup where the api is controller ApiController and signup needs to be changed. it may be signin, create, del, move, etc. how can I write in the route, in order to make the subsequent values correspond to the specified controller... I now have links of this type:
Http://www.xxx.com/api/signup
The api is the controller ApiController.
Signup needs to be transformed. it may be signin, create, del, move, etc.
How can I write it in the route so that the subsequent values correspond to the methods in the specified controller?
That is to say, access http://www.xxx.com/api/signupto apply to the signup.pdf under the apicontroller, and check signin,create,del,move
Reply content:
I now have links of this type:
Http://www.xxx.com/api/signup
The api is the controller ApiController.
Signup needs to be transformed. it may be signin, create, del, move, etc.
How can I write it in the route so that the subsequent values correspond to the methods in the specified controller?
That is to say, access http://www.xxx.com/api/signupto apply to the signup.pdf under the apicontroller, and check signin,create,del,move
Route: controller ('api ', 'apicontroller ',[
'signup' => 'api.signup','signin' => 'api.signin','create' => 'api.create','del' => 'api.del','move' => 'api.move',
]);
Class ApiController extends Controller
{
public function getSignup(){ return 'index';}public function getSignin(){ return 'create';}..........
}