Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Avvernio opened this issue Sep 7, 2020 · 7 comments
Closed

Comments

@Avvernio
Copy link

Avvernio commented Sep 7, 2020

  • Jetstream Version: 0.7.0
  • Laravel Version: 8.0
  • PHP Version: 7.4.9
  • Database Driver & Version: MariaDB 10.4.14

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
Copy link
Author

Avvernio commented Sep 7, 2020

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

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

@andersondeoliveiramachado
Copy link

andersondeoliveiramachado commented Sep 7, 2020

It happened in my test here too

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

@andersondeoliveiramachado

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

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

SOLVED !

laravel/fortify#7

@Avvernio
Copy link
Author

Avvernio commented Sep 7, 2020

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

@Avvernio Avvernio closed this as completed Sep 7, 2020
@abdessamadely
Copy link

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
Copy link

king-team-du-net commented Sep 21, 2020

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
Copy link

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants