Answer the question
In order to leave comments, you need to log in
How to get another repository?
I use Prettus/L5-repository.
In the controller, let's say UserController, we need to pull data from the RoleRepository repository.
If in the case of the current repository we use this construction:
use App\Repositories\UserRepository;
...
public function __construct(VideoRepository $repository, VideoValidator $validator)
{
$this->repository = $repository;
$this->validator = $validator;
}
....
$this->repository->all();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question