Advertisement
corzopabloariel

Attach Mail

Jul 7th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. public function build()
  2.     {
  3.         $title = "Presupuesto";
  4.         $return = $this->replyTo( $this->data[ "email" ], $this->data[ "nombre" ] )
  5.             ->subject( $title )
  6.             ->view('form.presupuesto')
  7.             ->with( $this->data );
  8.         if(!empty( $this->file)) {
  9.             $return = $return->attach($this->file->getRealPath(),
  10.             [
  11.                 'as' => $this->file->getClientOriginalName(),
  12.                 'mime' => $this->file->getClientMimeType(),
  13.             ]);
  14.         }
  15.         return $return;
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement