title: Laravel queues issues when I pass data from controller to jobs
body: <p>I'm having issue fixing the queue part for Laravel. </p>
  
  <p>I have a contact form which works perfectly. I submit the form and a mail is being sent to me with the input details from the form. </p>
  
  <p>But the issue is that if you do not use the Laravel Queues then the UX is lacking because of the waiting time before the mail is being sent and after getting the success message. </p>
  
  <p>So now I want to implement the queuing part, but im not doing it right. Im still a noob at it... </p>
  
  <p>Here is my controller</p>
  
  <p><strong>KontaktformController.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\Jobs\SendEmailJob;
  use Carbon\Carbon;
  use Illuminate\Support\Facades\Mail;
  use Illuminate\Support\Facades\Session;
  use App\Kontaktform;
  use Illuminate\Http\Request;
  use App\Mail\SendEmailMailable;
  
  class KontaktformController extends Controller
  {
  
      public function create()
      {
          return view('kontakt');
      }
  
  
      public function store(Request $request) {
          $this-&gt;validate($request, [
              'name' =&gt; 'required|string',
              'mobile' =&gt; 'required',
              'email' =&gt; 'required|email',
              'subject' =&gt; 'required',
              'message' =&gt; 'required',
          ]);
          /*
            Add mail functionality here.*/
  
          $kontakt = new Kontaktform([
              'navn'  =&gt; $request['name'],
              'mobilnr' =&gt; $request['mobile'],
              'fastnetnr' =&gt; $request['landline'],
              'mail' =&gt; $request['email'],
              'emne' =&gt; $request['subject'],
              'beskrivelse' =&gt; $request['message']
          ]);
          $kontakt-&gt;save();
  
          //$user['email'] = 'test@test.com';
  
          $job = (new SendEmailJob($request['email']))
              -&gt;delay(Carbon::now()-&gt;addSeconds(3));
  
          dispatch($job);
  
  
      }
      }
  </code></pre>
  
  <p><strong>SendEmailJob.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Jobs;
  
  use App\Mail\SendEmailMailable;
  use Illuminate\Bus\Queueable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Queue\InteractsWithQueue;
  use Illuminate\Contracts\Queue\ShouldQueue;
  use Illuminate\Foundation\Bus\Dispatchable;
  use Illuminate\Support\Facades\Mail;
  
  class SendEmailJob implements ShouldQueue
  {
      use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
  
      protected $user;
  
      /**
       * Create a new job instance.
       *
       * @return void
       */
      public function __construct($user)
      {
          $this-&gt;user = $user;
      }
  
      /**
       * Execute the job.
       *
       * @return void
       */
      public function handle()
      {
          $email = new SendEmailMailable('test@test.dk');
          Mail::to('admin@admin.dk')-&gt;send($email);
  
      }
  }
  </code></pre>
  
  <p><strong>SendEmailMailable.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Mail;
  
  use Illuminate\Bus\Queueable;
  use Illuminate\Mail\Mailable;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Contracts\Queue\ShouldQueue;
  
  class SendEmailMailable extends Mailable
  {
      use Queueable, SerializesModels;
  
  
      public $request;
      /**
       * Create a new message instance.
       *
       * @return void
       */
      public function __construct($request)
      {
          $this-&gt;request = $request;
      }
  
      /**
       * Build the message.
       *
       * @return $this
       */
      public function build()
      {
          return $this-&gt;from('test@test.dk')-&gt;view('mail.kontaktform');
      }
  }
  </code></pre>
  
  <p><strong>kontaktform.blad.php</strong></p>
  
  <pre><code>{{$request['email']}}
  </code></pre>