Laravel Model get all where $id = Auth::user()->id
<p>How to List all rows from a DB where $id matches the logged user id.
I'm using default Auth from Laravel.</p>

<p>At the moment i can list them all with this method in my controller:</p>

<pre><code>public function index(){

    $invoices = Invoice::all();
    return view('index', compact('invoices'));
}
</code></pre>

<p>But i just want the ones that are from this user which is logged in:</p>

<p>Something like</p>

<pre><code>$invoices = Invoice::where('id', '=', Auth::user()-&gt;id);
</code></pre>