for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Mail;
use App\Models\User;
use App\Models\Institution_class;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class StudentImportSuccess extends Mailable
{
use Queueable, SerializesModels;
Illuminate\Queue\SerializesModels
App\Mail\StudentImportSuccess
$id
$relations
$class
$keyBy
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($file)
$institution = Institution_class::find($file['institution_class_id']);
$this->user = User::find($file['security_user_id']);
user
$this->subject = 'SIS Bulk upload: '. $file['subject'] .$institution->institution->code.': '. $institution->name.' ' . date('Y:m:d H:i:s');
name
App\Models\Institution_class
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.
code
App\Models\Institution
$this->from_address = env('MAIL_FROM_ADDRESS');
from_address
$this->from_name = 'SIS Bulk Uploader';
from_name
$this->with = [
with
'name' => $this->user->first_name,
'link' => env('APP_URL').'/create/'
];
$this->viewData = [
'name'=>$this->user->first_name, "body" => "Student upload success, you can access the data from open email UI and dashboard",
}
* Build the message.
* @return $this
public function build()
return $this->view('emails.mail')
->from($this->from_address,$this->from_name)
->to($this->user->email)
email
App\Models\User
->subject($this->subject)
->with($this->with);