1

I am new to Laravel, there is a get request to following url:

http://localhost/Script/login/fb

but i am getting : 404 Bad Request in my console, and the control goes in the fail block. Please help to sort out my issue.

layout.blade.php

body.on('loggedIn:fb', function(){
    if(!User.isLoggedIn()) {
            $.get(BASE_PATH + '/login/fb').success(function(response){
                User.setData(response.user);
            }).fail(function(jqXHR, textStatus, errorThrown){

                body.trigger('social-login:error', jqXHR.responseText);
            }).always(function(){
                loginModal.removeClass("logging-in");
            });
        }
    });

routes/web.php

Route::get('/login/fb', array('as' => 'loginWithFb', 'uses' => 'UserController@loginWithFb'));
user3653474
  • 3,393
  • 6
  • 49
  • 135

0 Answers0