Reputation: 1928
I want to send an email in my project. The action:
public function priceQuotePost(Request $request){
$email = $request->email;
Mail::to($email)->send(new priceQuoteThanks());
return view('front.priceQuoteThanks');
}
I included the mail facade at the start of the controller (after the namespace).
The error:
FatalErrorException Class 'App\Http\Controllers\priceQuoteThanks' not found in FrontController.php (line 58)
The class is in the app\Mail
folder
Upvotes: 2
Views: 40
Reputation: 2945
just import it at the top like this :
use App\Mail\priceQuoteThanks;
if the is in app\Mail
folder so the namespace will be : App\Mail\priceQuoteThanks
Upvotes: 2