Route:
Route::get('api/product/getProductsForAutomatic', ['uses'=>'ProductController@listSomeProducts']);
Controller:
public function listSomeProducts(){
$products = DB::table('products')->select('description')->get();
return $products; }
Angularjs:
$http({
url: API_URL + "product/getProductsForAutomatic",
method: "GET",
data: {provider: $scope.provid, categorias:$scope.categorias},
}).success(function(response) {
alert(response);
}).error(function(response) {
console.log(response);
alert('This shit is going down');
});
The answer is always empty, never returns anything from the php driver.
And if I want to access the page through the browser to see if it shows some results the page appears blank.
Any idea what it will be?