123456789101112131415161718192021 |
- <?php
- namespace App\Http\Controllers;
- use Illuminate\Http\Request;
- use Mail;
- use App\Mail\SendMail;
- class EmailController extends Controller
- {
- public static function index($title,$body)
- {
- $mailData = [
- 'title' => $title,
- 'body' => $body,
- ];
- Mail::to('alexis@bureau-telecoms.fr')->send(new SendMail($mailData));
- session()->flash('status', 'Envoyé avec succès');
- redirect('/');
- }
- }
|