Support the ongoing development of Laravel.io →
posted 9 years ago
Validation
Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

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_n...

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

divdax divdax Joined 3 Feb 2014

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.