Laravel framework comes with built-in Auth system, which is pretty good. But it doesn't cover all the cases, and the most common one is administrat...
For further actions, you may consider blocking this person and/or reporting abuse
Argument 1 passed to App\Notifications\NewUser::__construct() must be an instance of App\Notifications\User, instance of App\User given, called in /var/www/html/adminApprove/app/Http/Controllers/Auth/RegisterController.php on line 76
that error?
hi. I am new in Laravel. Have you figured out about this error?
People... you just need to add "use App\User;" after the namespace at the top of your file.
help me
Call to undefined method App\Notifications\NewUser::via()
this is my Controllerregister.php
...
use App\Notifications\NewUser;
...
$user = User::create([
'name' => $data['name'],
'prenom' => $data['prenom'],
'matricule' => $data['matricule'],
'fonction' => $data['fonction'],
'emploi' => $data['emploi'],
// recup id
//'id_role'=> $data['role'],
'id_str'=> $id_str,
'id_direct'=> $id_direct,
'id_ser'=> $id_ser,
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
$admin = User::where('email', 'dogosidik@gmail.com')->first();
if ($admin) {
$admin->notify(new NewUser($user));
}
return $user;
NewUser.php
class NewUser extends Notification
{
use Queueable;
}
ERROR::::
Argument 1 passed to App\Notifications\NewUser::__construct() must be an instance of App\Notifications\User, instance of App\User given, called in C:\xampp\htdocs\staffPortal\app\Http\Controllers\Auth\RegisterController.php on line 75
Help please
I get
Call to undefined method App\Notifications\NewUser::via()
I am using Laravel 5.8
Hi, help please, am i missing something here ?
may i help you?
Not any error not work this
in admin page not showing user that need to approve, and after register notification application not send approval button to admin email. what is missing ?
in admin page not showing user that need to approve, and after register notification application not send approval button to admin email. what is missing ?