Hello,
i work for the first time with Laravel.
In the tutorial I am now arrived in the mail delivery.
Unfortunately, the placeholder for the message will not be replaced .
This is the Template:
Hallo lieber Interessent,
vielen Dank für Ihre E-Mail an uns. Wir werden diese so schnell wir möglich beantworten.
Das war Ihre Nachricht:
{{ $data['message'] }}
Ihre Email:
{{ $data['email'] }}
Mit freundlichen Grüßen,
Ihr Laravel Anfänger Tutorial Team
And the PageController:
public function sendkontakt()
{
$rules = array(
'email' => 'Required|Between:3,64|Email',
'message' => 'Required'
);
$validator = \Validator::make(array(\Input::all()), $rules);
if(true) {//$validator->passes()
\Mail::send('email.kontaktdefault', \Input::all(),
function($message)
{
$message->from('from@bla.de', 'Laravel Anfänger Tutorial');
$message->to('to@bla.de', 'Dirk Helbert')->subject('Nur ein Test!');
}
);
return \Redirect::action('PageController@kontakt')->with('sendsuccess',1);
} else {
return \Redirect::action('PageController@kontakt')->withInput()->withErrors($validator);
}
exit;
}
Thx for your help. Robby
The view doesn't have the extension .blade.php. It works fine with blade.php
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community