Skip to content

Possible [BUG] Can't app::bind a class that extends Eloquent #139

Closed
@johnnncodes

Description

@johnnncodes

I can't app::bind() this - class ArrayUserRepository extends Eloquent implements UserRepository { }

But if I'm doing class ArrayUserRepository extends SomeClass implements UserRepository {} it works.

Here is the binding - App::bind('UserRepository', 'ArrayUserRepository');

This is the error - BindingResolutionException: Unresolvable dependency resolving [Parameter #0 [ array $attributes = Array ]].

In the screencast of #L4 about IOC container, it binds the ArrayUserRepository in the UserRepository interface however it is not using Eloquent. I wanted to use eloquent methods so I want ArrayUserRepository to extend Eloquent but it always throws an error when binding it to the UserRepository interface.

Maybe this is a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions