Support the ongoing development of Laravel.io →
Requests Database Validation
Last updated 2 years ago.
0

I usually use something like this, it's passed to a function in a general utility class:

public function fixint($tonl) {
        $this->tonl = (is_null($tonl) || empty($tonl) || strlen($tonl) < 1 ? NULL : $tonl);
   
    return $this->tonl;
    }

0

Thanks a lot!

0

Thanks!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

tutNichts tutnichts Joined 16 Dec 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.