Llamada al método undefined IlluminateDatabaseQueryBuilder:: notify()
Problema en Laravel 5.3.6 cuando se envía una solicitud en Forgot Password.
Detalles del error
Llamada al método undefined Illuminate\Database \ Query \ Builder:: notify()
El problema está en el siguiente archivo:
Vendor \ laravel \ framework \ src \ Illuminate \ Auth \ PasswordBroker.php
Línea 69. El código está debajo
$user->sendPasswordResetNotification(
$this->tokens->create($user)
);
Función: sendResetLink
Estaba funcionando bien en Laravel 5.2 y parece que no funciona en 5.3.6 versión. ¿Se ha enfrentado a este problema?
3 answers
Debe agregar Illuminate\Notifications\Notifiable
rasgo en el modelo User
.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-10-04 09:52:20
-
Agregue el rasgo Notificable en su modo de usuario.
Illuminate\Notifications\Notifiable
-
Agrega esto en tu app.php:
Para sus proveedores:
Illuminate\Notifications\NotificationServiceProvider::class,
En los alias:
'Notification' => Illuminate\Support\Facades\Notification::class,
- Recuerde actualizar su configuración desdeen config/mail.archivo php .
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-03-08 15:12:13
En mi caso, todavía estaba recibiendo error después de seguir los pasos dados en otras respuestas.
BadMethodCallException: Llamada al método undefined Illuminate\Database \ Query \ Builder:: notify()
Me faltaba
Use Notificable
...
use Illuminate\Notifications\Notifiable;
class User extends Model
{
use SoftDeletes, Notifiable;
...
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-09-06 00:40:46