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\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class EmptyFile extends Mailable
{
use Queueable, SerializesModels;
Illuminate\Queue\SerializesModels
App\Mail\EmptyFile
$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'].' Empty ' . $institution->institution->code.': '. $institution->name.' '. date('Y:m:d H:i:s');
code
App\Models\Institution
Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.
name
App\Models\Institution_class
$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' => \App::environment('local') || \App::environment('stage') ? env('APP_URL') : env('APP_URL').'/bulk-upload/'
];
$this->viewData = [
'name'=>$this->user->first_name, "body" => "No data Found in ". $file['filename']. ' Please re-upload the file with data',
}
* 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);