public function getSendInterviewTime(LoggedInRequest $request, $id) { $application = Application::findOrFail($id); Mail::send('emails.interviewTime', compact('application'), function ($m) use($application) { $m->to($application->email, $application->name)->from('*****@*****.**', 'Ignite')->subject('Ignite Interview: ' . (isset($application->interview->id) ? $application->interview->interviewDate->format('D, M j, g:i a') : "")); }); $application->emailed = true; $application->save(); return $this->getApplication($request, $id); }