Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

I think you have to write in DB::raw like as bellow :

$columns =  array(DB::raw("min(created_at)"), DB::raw("man(created_at)"))
$this->model->selectRaw($columns);
print_r($this->model->toSql());
return $this;
Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

dbclkclk dbclkclk Joined 27 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.

© 2024 Laravel.io - All rights reserved.