i'm have a router register but i found error
Target [Laravel\Fortify\Contracts\RegisterViewResponse] is not instantiable.
You need to register fortify service provider inside the config/app.php
files
Add this
App\Providers\FortifyServiceProvider::class,
to config/app.php
under the Application's Service Providers.
Update : It is also important you point the location of your authentication views to Fortify.
An example for the Register view would be:
// auth.register => means your register.blade is located in `view/auth/`
// folder. (All things being equal)
Fortify::registerView(function () {
return view('auth.register');
});
Read More: https://laravel.com/docs/9.x/fortify#registration
you have to add all these in FortifyServiceProvider.php at the boot method. then import all classes needed
Fortify::loginView(function(){
return view('auth.login');
});
Fortify::authenticateUsing(function(Request $request){
$user = User::where('email',$request->email)->first();
if($user && Hash::check($request->password,$user->password)){
return $user;
}
});
Fortify::registerView(function(){
return view('auth.register');
});
after that you need to create the register and login view
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With