1
我是laravel的新手。最近我从github克隆了示例项目。我尝试做凝乳手术。当我发布的数据,我得到laravel - Ajax Post说NotFoundHttpException
{"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',
'[email protected]'
);
Route::get
(
'get-executive/{sponsorID}',
'[email protected]'
);
);
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)
{
...
}
阿贾克斯网址:http://localhost:8080/app/public/deal/executive
个发表参数:
_token : WXv5u4zYkANnnWidTciFN8HVrz2ARECe669Kwvqn
first_name : test
last_name : test
我认为您的网址没有正确构建......您是如何做到的? – Amarnasan