Open maxi032 opened 9 years ago
Correct me if I'm wrong!
@maxi032 Hey! Now I'm studying this package. I have the same problem, so I looked into the code. Somehow findWhere
method is no more available. Seems that you can achieve this by doing like this:
// If you only have a single query condition
$sections = $this->sectionRepo->findBy('status', '1');
// If you have more than two conditions
$this->sectionRepo->pushCriteria(new YourCriteria1);
$this->sectionRepo->pushCriteria(new YourCriteria2);
$sections = $this->sectionRepo->all();
UPDATE. Oh! I found findWhere() method at Eloquent/Repository.php
.
You need to install master branch in your project in order to access findWhere method.
I'll tag latest version today ;)
Same here, just cannot find any reference to "findWhere" in the code
in the vendor version obtain by composer not find findWhere and others like findAllBy ...
is not tagged the last version
Tagged, sorry took me too long :)
I am getting the above message and I don't know what I am doing wrong. I am calling the findWhere method from a view composer. Here is my code
<?php namespace App\Composers;
use Eventsapp\Repositories\SectionRepository; use Eventsapp\Repositories\PageRepository; use Eventsapp\Repositories\PostRepository;
class OnePageComposer{
} My SectionRepository looks like this:
<?php namespace App\Repositories;
use Bosnadev\Repositories\Contracts\RepositoryInterface; use Bosnadev\Repositories\Eloquent\Repository;
class SectionRepository extends Repository{
}