Level 3
Bump
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello all -
So I want to have a boolean option in the edit user view within Nova.
But if the admin switch true or false, I want to pass timestamp (for true) or Null (for false)... I'm triping up somewhere
Heres my code;
Boolean::make('Verified?', 'email_verified_at')
->trueValue(function(){
return date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
})
->falseValue(Null),
Error is:
Preg match expects param 2 to be a string
Cheers - Ant
Please or to participate in this conversation.