Support the ongoing development of Laravel.io →
Mail Session Configuration
Last updated 2 years ago.
0

I am new to Laravel my self, but I think sending mail first and then returning the view might help.

0

All sorted! Thanks for the suggestion, worked out great!

I had to alter a few lines for referencing controllers and such though

<?php

namespace App\Http\Controllers;

use Auth;
use Image;
use App\User;
use App\Mail\Success;
use Illuminate\Http\Request;
use Mail;

class SuccessController extends Controller
{
    public function index() {
		$user = Auth::user();
		Mail::to($user)->send(new Success($user));
		return view('pages.success');
	}
	
}

Thanks again! :D

0

Awesome. Glad you figured it out and thanks for sharing.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

RabbitSC2 rabbitsc2 Joined 15 May 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.