Support the ongoing development of Laravel.io →
Database Eloquent

Guys, good night. It's OK?

I have a question that is difficult to solve.

How would I make this query using Laravel 5 Repositories?

$ Result = DB :: select ('select * from user or where not exists (select 1 from challenges c where u.id = c.user_id limit 1)')

The query is bringing the result perfectly, but not in the format to use in the angular.

This point I'm not understanding how to return the same query:

$ Result = $ this-> challengeRepository-> skipPresenter () -> with ($ this-> with) -> findWhere ([
// Default Condition =
?????
]) -> first ();

Remember that if I use a simple query the result is shown normally.

$ Result = $ this-> repository-> skipPresenter () -> with ($ this-> with) -> first ();

Does anyone have a tip?

Thank you.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Dapcapix dapcapix Joined 12 Dec 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.