I have a table (with soft delete) and it is a whats on table. There is a field which is just a date field with the start date.
What I am trying to do is use eloquent to get a list of what on today onwards, but my attempts throw an error:
$wo = App\WhatsOn::whereDate('startDate', '=>', date('Y-m-d') )->get();
The error I am getting is
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=> ? and
whatson.deleted_atis null' at line 1 (SQL: select * fromwhatsonwhere date(startDate) => 2019-05-05 andwhatson.deleted_atis null)
Help greatly appreciated!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire