laravel / jetstream

Tailwind scaffolding for the Laravel framework.
https://jetstream.laravel.com
MIT License
3.98k stars 822 forks source link

Target [Laravel\Fortify\Contracts\CreatesNewUsers] is not instantiable. #83

Closed Avvernio closed 4 years ago

Avvernio commented 4 years ago

Running on latest Xampp build (windows) using Vhost

Description:

On a new laravel 8 dev environment upon trying to registering and submitting the form the "Target [Laravel\Fortify\Contracts\CreatesNewUsers] is not instantiable." error appears

Steps To Reproduce:

composer create-project --prefer-dist laravel/laravel laravel8 dev-develop composer require laravel/jetstream php artisan jetstream:install livewire npm install && npm run dev php artisan migrate

Avvernio commented 4 years ago

just to be sure i made another clean copy, same result

stack trace: https://flareapp.io/share/A7EQNg7r#F51

andersondeoliveiramachado commented 4 years ago

It happened in my test here too

https://flareapp.io/share/Bm0LRemx#F54

andersondeoliveiramachado commented 4 years ago

just to be sure i made another clean copy, same result

stack trace: https://flareapp.io/share/A7EQNg7r#F51

SOLVED !

https://github.com/laravel/fortify/issues/7

Avvernio commented 4 years ago

Thanks @andersondeoliveiramachado solution was the correct one for me as well.

abdessamadely commented 4 years ago

Well it looks like if you don't use fortify with jetstream (or in this case not registering jetstream views) you need to register your own views, in my case was:

Fortify::loginView(function () {
    return view('auth.login');
});

Fortify::registerView(function () {
    return view('auth.register');
});
king-team-du-net commented 4 years ago

Hi,

On a new laravel 8 development environment, when trying to change the password

Illuminate\Contracts\Container\BindingResolutionException Target [Laravel\Fortify\Contracts\RequestPasswordResetLinkViewResponse] is not instantiable.

Fortify::requestPasswordResetLinkView(function () { return view('auth.forgot-password'); });

Thanks

bedus-creation commented 4 years ago

One thing that I am missing over here while using fortify without jetstream is to forget registration of FortifyServiceProvider.

// app.php
App\Providers\FortifyServiceProvider::class,