freak22's avatar

Eloquent More Trouble than it's Worth?

Here are a couple examples of a queries straight out of a recent application I had to use Fluent for because I couldn't figure out how to accomplish it using Eloquent https://mobdro.bio/ .

$listings = \DB::table('listings as l') ->select('l.id', 'title') ->join('contents as c', function($join) use ($site_id) { $join->on('l.content_id', '=', 'c.id') ->where('site_id', '=', $site_id); }) ->orderBy('updated') ->take($how_many) ->get();

0 likes
1 reply

Please or to participate in this conversation.