1.如何使用这个方法去更新数据,这个方法是使用
php artisan make:controller ArticlesController
生成的
public function update(Request $request, $id)
{
//
}
在路由中应该如何定义这个方法的访问方式
2.web表单中如何提交delete、put请求,删除只是访问一个链接
/**
* 资源控制器RESTFUL
* GET /articles ArticlesController@index
* GET /articles/create ArticlesController@create
* POST /articles ArticlesController@store
* GET /articles/{id} ArticlesController@show
* GET /articles/{id}/edit ArticlesController@edit
* PUT/PATCH /articles/{id} ArticlesController@update
* DELETE /articles/{id} ArticlesController@destory
*/
表单中如何实现最后的DELTE请求,a发送ajax可以做到使用http的各种请求方式,表单或页面中如何实现
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
小伙看你根骨奇佳,潜力无限,来学PHP伐。