The only one problem is you have to replace all /auth/login/
to auth/login
and /auth/logout/
to auth/logout
in your route and angular script.
So your route should be,
Route::get('/', function(){
return View::make('index');
});
Route::post('auth/login', 'AuthController@login');
Route::get('auth/logout', 'AuthController@logout');
And js,
angular.module("epicApp")
.factory('AuthenticationService', function($http, $location){
return{
login: function(credentials){
return $http.post("auth/login", credentials);
},
logout: function(){
return $http.get("auth/logout");
}
}
})