Laravel 3 Eloquent How to select column as -


i'm trying figure out how give column alias using eloquent.

so, in other words, how execute following mysql query using eloquent?

select occupation test users occupation = 'pimp'; 

thx in adv!

eloquent returns regular fluent query. can try (assuming model name 'user'):

$user = user::where_occupation('pimp')->get(array('occupation test')); 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -