Error: Call to a member function on array
findBy
returns an array of entities that satisfy the condition. If you are sure there is only one, you can just use findOneBy
instead and you will get a single entity.
findBy
returns an array of entities that satisfy the condition. If you are sure there is only one, you can just use findOneBy
instead and you will get a single entity.