In this case, you need to convert the date to query, if mysqlused as your database, then you can use a raw query, for example:
// Assumed my_birthday is like 1255033470
$raw = DB::raw("date_format(from_unixtime(my_birthday),'%b %d, %Y %l:%i %p') as dob");
$result = Model::get(array('id', 'username', $raw));
You can write it in one line:
$result = Model::get(array('id', 'username', DB::raw("...")));
source
share