title: Consuming laravel api by angular
body: <p>Im working on a laravel 5 / angular 1 application ! 
  I wanted to use database infos in my app but I get them under a json format in the view ! 
  Here's the angular controller : </p>
  
  <pre><code>angular
  .module('alerts')
  .controller('alertscontroller', function($scope,$http){
  $scope.alerts = [];
  $http.get('{{ url('resident.alerts') }}').success(function ($data) {
                $scope.alerts = $data;
                              });
  });
  </code></pre>
  
  <p>and here's is my laravel view </p>
  
  <pre><code>&lt;div class="container" ng-app="alerts" ng-controller="alertscontroller"&gt;
  &lt;div class="col-sm-3" ng-repeat="alert in alerts"&gt;
    &lt;div class="thumbnail"&gt;
    &lt;div class="caption"&gt;
      &lt;h3&gt;User X&lt;/h3&gt;
      &lt;p&gt;&lt;strong&gt;Title : &lt;/strong&gt;@{{ alert.title }}&lt;/p&gt;
      &lt;p&gt;&lt;strong&gt;Type : &lt;/strong&gt;@{{ alert.type }}&lt;/p&gt;
      &lt;p&gt;&lt;strong&gt;Description : &lt;/strong&gt;@{{ alert.description }}&lt;/p&gt;
    &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>what I get as a result is the following</p>
  
  <pre><code>[{"id":1,"title":"Title1","description":"descriptionk,","type":"opel","status":0,"user_id":0,"created_at":"2016-08-20 21:41:00","updated_at":"2016-08-20 21:41:00"},{"id":2,"title":"Title1","description":"descriptionk,","type":"opel","status":0,"user_id":0,"created_at":"2016-08-20 21:44:05","updated_at":"2016-08-20 21:44:05"},{"id":3,"title":"Title1","description":"descriptionk,","type":"opel","status":0,"user_id":0,"created_at":"2016-08-20 21:51:54","updated_at":"2016-08-20 21:51:54"},{"id":4,"title":"Im stuck in the elevator","description":"the elevator stoped in the fourth floor when I was getting to the second floor, please help me","type":"other things","status":0,"user_id":0,"created_at":"2016-08-21 15:06:41","updated_at":"2016-08-21 15:06:41"},{"id":5,"title":"Im stuck in the elevator","description":"the elevator stoped in the fourth floor when I was getting to the second floor, please help me","type":"other things","status":0,"user_id":0,"created_at":"2016-08-21 15:08:34","updated_at":"2016-08-21 15:08:34"}]
  </code></pre>