You've already forked isop-mirror
feat: implement email notification for internship status updates and add missing student relationship
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Mail\InternshipStatusUpdated;
|
||||
use App\Models\Internship;
|
||||
use App\Models\InternshipStatus;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Mail;
|
||||
|
||||
class InternshipStatusController extends Controller
|
||||
{
|
||||
@@ -127,6 +129,8 @@ class InternshipStatusController extends Controller
|
||||
'modified_by' => $user->id
|
||||
]);
|
||||
|
||||
Mail::to($internship->student)->sendNow(new InternshipStatusUpdated($internship, $user->name, $internship->student->name, $internship->company->name, $internshipStatus->status, $request->status, $request->note));
|
||||
|
||||
return response()->noContent();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user