<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;

class Credential extends Mailable
{
    use Queueable, SerializesModels;
	
	public $email;
	public $password;
	public $company;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($email, $password)
    {
		
        $this->email = $email;
		$this->password = $password;
		$this->company = \Auth::user()->employee->company;
		
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->subject('Credential')->from($this->company->contacts['email'], $this->company->name)->view('emails.credential');
    }
}
