Do a dd($data)
and see what exactly is the $data->my_date
value.
0000-00-00 00:00:00
is not NULL
, its still a date.
Use empty() instead? empty() and is_null() is kinda different in some contexts. For most of the time I'd rather use empty() function.
Here is the link discussing more on this kind of problem: http://techtalk.virendrachandak.com/php-isset-vs-empty-vs-is_null/
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community