Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. public function updateSentStatus(Request $request, $id)
  2. {
  3. $invoice= $this->invoices->find($id);
  4.  
  5. $beautymail = app()->make(\Snowfire\Beautymail\Beautymail::class);
  6. //dd();
  7. $d=$invoice->client->email;
  8. $data=array(
  9. 'email'=>$d,
  10. );
  11.  
  12. $beautymail->send('invoices.email', $data, function($message) {
  13.  
  14. $data =Input::get('email');//email penerima
  15.  
  16. $message
  17. ->from('donotreply@justlaravel.com')
  18. ->to($data, 'Howdy buddy!')
  19. ->subject('Test Mail!');
  20. });
  21. $this->invoices->updateSentStatus($id, $request);
  22.  
  23. return redirect()->back();
  24.  
  25.  
  26. // Session::flash("message","Email sent successfully");
  27. // return Redirect::back();
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement