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

BindingResolutionException #26

Closed
basarozcan opened this issue Jan 2, 2018 · 6 comments
Closed

BindingResolutionException #26

basarozcan opened this issue Jan 2, 2018 · 6 comments
Labels

Comments

@basarozcan
Copy link

basarozcan commented Jan 2, 2018

Here is the error:
BindingResolutionException
Unresolvable dependency resolving [Parameter #0 [ $user ]] in class Gerardojbaez\Laraplans\SubscriptionBuilder

in Container.php (line 910)

Here is the code:

public function index()
{
$user = Auth::user();
$plan = Plan::find(1);
$user->newSubscription('main', $plan)->create();
}

I added use Gerardojbaez\Laraplans\Models\Plan; in beginning of the controller but it never worked. Could you please help me?

@gerardojbaez
Copy link
Owner

What Laravel version are you using?

@basarozcan
Copy link
Author

I'm using 5.4

@gerardojbaez
Copy link
Owner

There's a commit already in the repository (7f8c23b) but has not been released yet; it will be soon!

@AFZidan
Copy link

AFZidan commented Feb 8, 2018

I have same issue
Unresolvable dependency resolving [Parameter #0 [ <required> $user ]] in class Gerardojbaez\Laraplans\SubscriptionBuilder
with laravel 5.5

@josteph
Copy link

josteph commented Feb 23, 2018

The fix is here. #30

@gerardojbaez
Copy link
Owner

The release is out: v2.2.0

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

No branches or pull requests

4 participants