Laravel: Retrieving A Record By Column Value
<p>How can I get a record by a value of a column. For example, I want the dataset where the column "foo" has the value "bar".</p>

<p>I didn't marked "foo" as unique key, but I could do so if its necessary.</p>

<p>I tried </p>

<pre><code>$order = Order::where('foo', '=', $bar)-&gt;get();
</code></pre>

<p>but I assume that gives back not just one dataset but an array of datasets, right?</p>

<p>The documentation is very poor and I cannot find an adequate answer with google. Thats a simple task for an orm, i dont know why its so complicated.</p>