【发布时间】:2018-11-06 07:34:00
【问题描述】:
我从 angularjs 发送 id 以获取 id 相关的特定记录,这是我的 angularjs 代码。
$http.post("getSingleRecord",{"id": id})
.success(function(response){
console.log(response);
});
在我的 laravel 控制器中,我收到了这样的数据。我已经在 framework/src/illuminate/routing/router.php 中定义了我的路由器。但我在第 179 行的 Routing/RouteCollection.php 中收到此错误 NotFoundHttpException。在 web.php 中,我刚刚返回 Auth::routes();我所有的路线都在工作,但只有这条不工作
$this->post("/getSingleRecord/{id}","controller@getRecord");
当然在我的控制器方法中,即; getRecord,我收到了这样的 id,但我没有得到任何 id,任何帮助将不胜感激,谢谢
$id = $request->route('id'); //laravel 5.7
print_r($id); //just want to see the id here
exit();
【问题讨论】:
标签: angularjs kendo-grid laravel-5.7