Reputation: 2015
How to do something like :
$user = $query->table('user')->select('name','email')->where('id > 3');
I mean,
How to make the query know that the action ends in where('id > 3')
so it will execute ?
Then, when we add ->orderBy('date')
, it won't execute after the query is finished build up..
Is it possible to do this ?
Should there be exec()
method at the very end of action ?
However, I see Laravel can do this
Upvotes: 0
Views: 62
Reputation: 9853
You can do like the following, It works fine
$user = $query->table('user')->select('name','email')->where('id' ,'>' 3)->get();
Upvotes: 1