@@ -29,7 +29,7 @@ |
||
| 29 | 29 | public function scopePublishedNews($query) |
| 30 | 30 | { |
| 31 | 31 | return $query->where('publish_date', '<=', Carbon::today()) |
| 32 | - ->where(function ($q) { |
|
| 32 | + ->where(function($q) { |
|
| 33 | 33 | $q->where('expire_date', '>=', Carbon::today()) |
| 34 | 34 | ->orWhere('expire_date', null); |
| 35 | 35 | }); |
@@ -60,12 +60,12 @@ |
||
| 60 | 60 | Mail::send( |
| 61 | 61 | 'emails.training', |
| 62 | 62 | ['user' => $user, 'training' => $training, 'due_date' => $dueDate, 'trainingUser' => $trainingUser], |
| 63 | - function ($m) use ($user, $training) { |
|
| 64 | - $m->to($user->email, $user->userFullName)->subject($training->name.' was assigned to you.'); |
|
| 63 | + function($m) use ($user, $training) { |
|
| 64 | + $m->to($user->email, $user->userFullName)->subject($training->name . ' was assigned to you.'); |
|
| 65 | 65 | |
| 66 | 66 | //ATTACH FILES |
| 67 | 67 | foreach ($training->attachments as $file) { |
| 68 | - $path = 'app/training_'.$file->imageable_id.'/'.$file->filename; |
|
| 68 | + $path = 'app/training_' . $file->imageable_id . '/' . $file->filename; |
|
| 69 | 69 | $m->attach(storage_path($path), ['as' => $file->filename, 'mime' => $file->mime]); |
| 70 | 70 | } |
| 71 | 71 | } // end $m function |