samedi 2 juin 2018

Getting error while fetching data from db in Laravel

I am trying to get data that match with my giving time, i pass time as a string for now but it gives error,

here is my code

$final_trade = FinalTrade::where('user_id', $user_id)
        ->where(Carbon::parse('created_at')->format('h:i:s'), '9.30.00')
        ->first();

here is the error,

DateTime::__construct(): Failed to parse time string (created_at) at position 0 (c): The timezone could not be found in the database



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire