bagsiz/easy-functions is a Laravel package for laravel package for useful & easy php functions.
It currently has 1 GitHub stars and 9 downloads on Packagist (latest version v1.1.2).
Install it with composer require bagsiz/easy-functions.
Discover more Laravel packages by bagsiz
or browse all Laravel packages to compare alternatives.
Last updated
Laravel package for useful & easy functions
This package can be installed through Composer.
composer require bagsiz/easy-functions
This function aims to check a model's fields against a random value and return that value
For example we want to check the id fields of App\User model,
you should write;
function checkUserModel() {
$user = new User();
$return EasyFunction::checkFieldForRandom($user, 'id', 'int', 8);
}
checkFieldForRandom($model, string $field, string $type, int $length)
'field''str' or Integer 'int'. Default 'str'8. Default 8This function aims to convert an integer with a decimal to time string
function someFunction() {
$timeString = EasyFunction::decimalToTime(936437.85); // Should return "10:20:07:17.85"
}
decimalToTime(int $decimal)
./vendor/bin/phpunit