Framework update, and moved markup() helper to new helpers.php
This commit is contained in:
parent
4f19da5987
commit
72648ea14d
@ -44,7 +44,10 @@
|
|||||||
"App\\": "app/",
|
"App\\": "app/",
|
||||||
"Database\\Factories\\": "database/factories/",
|
"Database\\Factories\\": "database/factories/",
|
||||||
"Database\\Seeders\\": "database/seeders/"
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
}
|
},
|
||||||
|
"files": [
|
||||||
|
"helpers.php"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
538
composer.lock
generated
538
composer.lock
generated
File diff suppressed because it is too large
Load Diff
9
helpers.php
Normal file
9
helpers.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
if (! function_exists('markup')) {
|
||||||
|
function markup($a,$b) {
|
||||||
|
return ($a > $b)
|
||||||
|
? sprintf('<span class="badge bg-danger>">(%3.1f%%)</span>',$a ? ($b-$a)/($b ?: 1)*100 : 100)
|
||||||
|
: sprintf('<span class="badge">%3.1f%%</span>',$a ? ($b-$a)/($b ?: 1)*100 : ($b ? 100: 0));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user