jeudi 2 août 2018

Carbon - Checking when there is no record in the database

So I'm trying to check if there is or isn't a record in the database for a session time. I'm using carbon.

This is my code

  

Currently there is no time, so there is a nonobject error being thrown, so I tried the ternary operator. The error I'm getting is.

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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire