Integrating Stripe with Laravel using Cashier
<p>Laravel 5.</p>

<p>I have followed the steps from <a href="https://laravel.com/docs/5.0/billing#subscribing-to-a-plan" rel="nofollow">Laravel's docs</a>.  All is working fine apart from creating invoices. </p>

<p><strong>1. Generating Invoice</strong></p>

<p>This  <code>$invoice = $user-&gt;invoices();</code> works</p>

<p>But when after passing it to view, using any of these</p>

<pre><code>{{ $invoice-&gt;id }} 

{{ $invoice-&gt;dateString() }}

{{ $invoice-&gt;dollars()}}
</code></pre>

<p>Returns this error:</p>

<blockquote>
  <p>Trying to get property of non-object</p>
</blockquote>

<ol start="2">
<li>Downloading Invoice</li>
</ol>

<p>And this command:</p>

<pre><code>return $user-&gt;downloadInvoice($invoice-&gt;id, [
    'vendor'  =&gt; 'Your Company',
    'product' =&gt; 'Your Product',
]);
</code></pre>

<p>also returns same error.</p>