<?php

namespace App\Mail;

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

use DB;
use Illuminate\Support\Facades\Schema;  //special
use Carbon\Carbon;
use Auth;
use Illuminate\Support\Facades\Mail;

class SendMailOperator extends Mailable
{
    use Queueable, SerializesModels;

    public $data;
    public $customer_name;
    public $phone;
    public $amount;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($customer_name,$phone,$amount)
    {
        $this->customer_name            = $customer_name;
        $this->phone                    = $phone;
        $this->amount                   = $amount;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
           return $this
                        ->from('bookings@ravanaadventurepark.com')
                        ->subject("New booking arrived!")
                        ->view('email.admin')
                        ->with('customer_name'      ,$this->customer_name)
                        ->with('phone'              ,$this->phone)
                        ->with('amount'             ,$this->amount);
    }
}
