Support the ongoing development of Laravel.io →
Requests Database Validation
Last updated 8 months 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!

LaraJobs

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.

© 2023 Laravel.io - All rights reserved.