yii2的restful api路由实例详解(2)

如同laravel的如下

Route::get("/v1/children", "ChildController@index");
Route::post("/v1/children", "ChildController@create");
Route::put("/v1/children/{uid}", "ChildController@update");
Route::patch("/v1/children/{uid}", "ChildController@update");
Route::delete("/v1/children/{uid}", "ChildController@delete");
Route::options("/v1/children", "ChildController@options");

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持黑区网络。