php - laravel ajax request error -


jquery:

$.get("{{url::asset('index.php/items/sessionstore')}}" + '/' + itemids,     function (data) {         alert(data);     } ); 

routes.php

route::get('items/sessionstore', 'itemscontroller@sessionstore'); 

controller

public function sessionstore($id) {     if(request::ajax())     {         echo $id;         echo "ajax";     }     else     {         echo "no ajax";     } } 

my error is:

{   "error": {     "type": "symfony\\component\\httpkernel\\exception\\notfoundhttpexception",     "message": "",     "file": "d:\\wamp\\ 

change route

route::get('items/sessionstore/{$id}', 'itemscontroller@sessionstore'); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -