Update to laravel 7

This commit is contained in:
KodeStar
2022-03-10 11:54:29 +00:00
parent 61a5a1a8b0
commit f9a19fce91
7170 changed files with 274189 additions and 283773 deletions

View File

@@ -1,5 +1,7 @@
<?php
use Illuminate\Support\Str;
function format_bytes($bytes, $is_drive_size = true, $beforeunit = '', $afterunit = '')
{
$btype = ($is_drive_size === true) ? 1000 : 1024;
@@ -11,6 +13,27 @@ function format_bytes($bytes, $is_drive_size = true, $beforeunit = '', $afteruni
else return(round($bytes, 0).$beforeunit.$labels[$x].$afterunit);
}
function str_slug($title, $separator = '-', $language = 'en')
{
return Str::slug($title, $separator, $language);
}
if (! function_exists('str_is')) {
/**
* Determine if a given string matches a given pattern.
*
* @param string|array $pattern
* @param string $value
* @return bool
*
* @deprecated Str::is() should be used directly instead. Will be removed in Laravel 6.0.
*/
function str_is($pattern, $value)
{
return Str::is($pattern, $value);
}
}
function get_brightness($hex) {
// returns brightness value from 0 to 255
// strip off any leading #