File manager - Edit - /var/www/html/spdc/api/app/Casts/Boolean.php
Back
<?php namespace App\Casts; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; class Boolean implements CastsAttributes { /** * Cast the given value. * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @param mixed $value * @param array $attributes * @return mixed */ public function get($model, string $key, $value, array $attributes) { return filter_var($value, FILTER_VALIDATE_BOOLEAN); } /** * Prepare the given value for storage. * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @param mixed $value * @param array $attributes * @return mixed */ public function set($model, string $key, $value, array $attributes) { return filter_var($value, FILTER_VALIDATE_BOOLEAN); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings