Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 4 months ago.
0
$customerhistory = Customerhistory::where('customer_id', 1)
            ->select('freetext') // also laravel include crated_at and updated_at timestamps as default
            ->first();

$date = \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $customerhistory->created_at)->format('Y-m-d');

0

Sign in to participate in this thread!

LaraJobs

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.