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;
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community