phplaravelfortify

target [Laravel\Fortify\Contracts\RegisterViewResponse] is not instantiable


i'm have a router register but i found error

Target [Laravel\Fortify\Contracts\RegisterViewResponse] is not instantiable.


Solution

  • 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