/
home
/
obinna
/
html
/
cravings
/
app
/
Mail
/
Upload File
HOME
<?php namespace App\Mail; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Mail\Mailable; use Illuminate\Queue\SerializesModels; class Plain extends Mailable { use Queueable, SerializesModels; private $user; public $subject; public $template; private $url; /** * Create a new message instance. * * @return void */ public function __construct($user, $template, $subject, $url) { $this->user = $user; $this->template = $template; $this->subject = $subject; $this->url = $url; } /** * Build the message. * * @return $this */ public function build() { return $this->from('hello@cravvings.com', 'Cravvings, Inc') ->subject($this->subject) ->view($this->template) ->with([ "name" => $this->user->name, "url" => $this->url ]); } }