title: Convey JSON from controller to AngularJS in Laravel
body: <p>In Laravel, I tried conveying data in MySQL as JSON to AngularJS. Although I  was successful at that, I'm confused how to utilize the values in AngularJS. Any help? </p>
  
  <p>Check output data (hide each value)</p>
  
  <p><a href="https://i.stack.imgur.com/1hJZF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1hJZF.png" alt="enter image description here"></a></p>
  
  <p>Controller</p>
  
  <pre><code>public function index(){
    return Response::json(Company::all());
  }
  </code></pre>
  
  <p>AngularJS</p>
  
  <pre><code>var app = angular.module('companySearchApp', [], function($interpolateProvider) {
      $interpolateProvider.startSymbol('&lt;%');
      $interpolateProvider.endSymbol('%&gt;');
  });
  
  app.controller('CompanyCtrl', function($scope, $http){
    $http.get('http://localhost:8000/json')
      .then(function(response){
        this.companies = response.data;
      });
  });
  </code></pre>
  
  <p>Display</p>
  
  <pre><code>&lt;div id="resultTable" align="center"&gt;
    &lt;h3&gt;Search Result&lt;/h3&gt;
  
    &lt;div ng-repeat="company in CompanyCtrl.companies"&gt;
      &lt;table border="1" style="margin-bottom:10px"&gt;
        &lt;tr&gt;
          &lt;td colspan="3" class="col-xs-12"&gt;&lt;% company.CompanyName %&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td class="col-xs-4"&gt;&lt;% company.City %&gt;&lt;/td&gt;
          &lt;td class="col-xs-4"&gt;&lt;% company.Province %&gt;&lt;/td&gt;
          &lt;td class="col-xs-4"&gt;&lt;% company.KeyWord %&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td colspan="3"&gt;&lt;% company.JobTitle %&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td colspan="3"&gt;&lt;% company.Link %&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>