this is my test ajax in laravel 5 (refer below)
$(\"#try\").click(function(){
var url = $(this).attr(\"data-link\");
$.ajax({
url: \"test\",
for me this error cause of different stuff. i have two ajax call in my page. first one for save comment and another one for save like. in my routes.php i had this:
Route::post('posts/show','PostController@save_comment');
Route::post('posts/show','PostController@save_like');
and i got 500 internal server error for my save like ajax call. so i change second line http request type to PUT and error goes away. you can use PATCH too. maybe it helps.