【发布时间】:2015-09-02 11:48:09
【问题描述】:
我是 laravel 的新手。最近我从 github 克隆了示例项目。我尝试做凝乳手术。当我发布我得到的数据时
{"error":"type":"Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException","message":"","file":"\/home\/sq1\/lampstack-5.5.28\/apache2\/htdocs\/app\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/RouteCollection.php","line":145}}
Routes.php
Route::group
(
[
'prefix' => '/executive/ajax',
],
function ()
{
Route::get
(
'get-executive',
'LeadExecutiveController@getLeadExecutives'
);
Route::get
(
'get-executive/{sponsorID}',
'LeadExecutiveController@getLeadExecutiveData'
);
);
Route::resource('/executive' ,'ExecutiveController');
ExecutiveController.php
public function store() //I think store action should work here
{
...
}
public function destroy($id)
{
...
}
public function getLeadExecutiveData($leadExecutiveID)
{
...
}
public function update($leadExecutiveID)
{
...
}
Ajax 网址:http://localhost:8080/app/public/deal/executive
帖子参数:
_token : WXv5u4zYkANnnWidTciFN8HVrz2ARECe669Kwvqn
first_name : test
last_name : test
【问题讨论】:
-
我认为您的 Url 构建不正确...您是如何做到的?
标签: php symfony laravel laravel-5