using laravel 5.6 and in my controller I have following code,
$input = $request->all();
$validator = $this->validator($input);
if ($validator->passes()){
$booking = $this->create($input)->toArray();
$booking['link'] = str_random(30);
DB::table('activations')->insert(['id_user' => $booking['id'], 'token' => $booking['link']]);
Mail::send('mail.activation', $booking, function($message) use ($booking) {
$message->to($booking['email']);
$message->subject('acxian.com - Activation Code');
});
but when I try submit button following error is occurring,
1/1) BadMethodCallException
Method [validator] does not exist.
how can I fix this?
from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2QNh0wO
via IFTTT
Aucun commentaire:
Enregistrer un commentaire