我是新来的拉拉。最近,我从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
Post参数:
_token : WXv5u4zYkANnnWidTciFN8HVrz2ARECe669Kwvqn
first_name : test
last_name : test发布于 2015-09-02 11:58:19
您正在发布到deal/executive,,但是您的资源设置为执行。将路由器更改为:
Route::resource('deal/executive' ,'ExecutiveController');https://stackoverflow.com/questions/32352339
复制相似问题