title: Laravel - Passing data to email view
body: <p>I can not access the confirmation_code variable in my email.verify view by using this variable in my view:</p>
  
  <pre><code>$user-&gt;confirmation_code
  </code></pre>
  
  <p>Shouldn't this be accessible when I assigned the array items like this? What am I overlooking?</p>
  
  <pre><code>$user = User::create([
              'name' =&gt; $data['name'],
              'email' =&gt; $data['email'],
              'password' =&gt; bcrypt($data['password']),
              'confirmation_code' =&gt; str_random(30)
          ]);
  
          Mail::send('emails.verify', ['user' =&gt; $user], function ($m) use ($user) {
              $m-&gt;to($user-&gt;email, $user-&gt;name)-&gt;subject('Email verificatie');
          });
  </code></pre>
  
  <p>All the other variables like, name, email, password are accessible and I am giving the mail send method my user object.</p>