3 years ago

Ajax Request 500 error, don't even hit the route

Posted 3 years ago by sasafister

I'm working on my app and locally everything works perfectly, but when I push project on production server, AJAX request breaks down. I have put X-CRSF token, nothing is in my log file, routes are working fine, but still getting 500 error.

Here is my AJAX code

            type: 'POST',
            url: '/upvote/' +,
            success: function(data) {

So, I can't reach my route, even tough they exist in routes

Route::post('/upvote/{id}/', function($id) {

   $title = \App\Title::find($id);
    $title->votes = $title->votes+1;


    return $title->votes;

Does anyone has idea what should I try?

Please sign in or create an account to participate in this conversation.