I'm using ajax to post a request then it refresh a part of the site with jquery function "load" and it's working good but when I try to redo this post it says MethodNotAllowedHttpException I think the problem in laravel csrf protection because after I refresh the whole page it works fine my problem is how can I save the csrf token even if I refresh a part of site ? ** thanks in advance ** (ᵔᴥᵔ)
these are the Routes
Route::post('/upvote', array(
'uses'=> 'AffichageController@upvote',
'as'=> 'upvote' ));
Route::post('/putcomment', array(
'uses'=> 'AffichageController@putcomment',
'as'=> 'putcomment'));
I think the problem is not in the routes because it works fine but when ajax loads a part of the website it stops working, this is how I load only part of site
$("#partOfSite").load('theURLofSITE #partOfSite')
if I reload the page it turns to work again