title: Extracting value of selected attribute from Laravel Eloquent ORM MySql query result
body: <p>I have a variable that saves result of Elqouent ORM MySql query result as such:</p>
  <pre><code> $from = DB::table('stops')
            -&gt;select('id',)
            -&gt;where('name','=',$data['from'])
            -&gt;get();
  </code></pre>
  <p>So I wish to know what number is the ID attribute.
  Result of query ($from variable contains) is following:</p>
  <pre><code>[{&quot;id&quot;:7}]
  </code></pre>
  <p>Now how do I &quot;extract&quot; that number 7 into a variable? i.e $id = .... ?!?
  Im not sure what kind of object or array or what that result is. Square brackets indicate array, curly maybe object ? I tried several ways to &quot;get my hands on&quot; that number but I was unsuccessful.</p>