Wednesday, March 15, 2017

Laravel Query Builder: select TIMESTAMP as Carbon object

Is it possible to select a timestamp column as a Carbon date object using the query builder? DateCreated in the snippet below:

$entities = DB::table('translation_review as tr')
    ...
    ->select('tr.AuthorID', 't.LanguageID', 't.DateCreated' /* <--- this one! */)
    ->get();



via Leonard

Advertisement