rokde / laravel-utilities
Some laravel or php related utilities.
Fund package maintenance!
rokde
paypal.me/rok
Buy Me A Coffee
Requires
- php: ^8.2
Requires (Dev)
- laravel/pint: ^1.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
Some laravel or php related utilities.
composer require rokde/laravel-utilities
Stopwatch
A simple stopwatch to measure the time between operations.
use Rokde\LaravelUtilities\Utilities\Stopwatch; $stopwatch = Stopwatch::make(); echo $stopwatch->measure(); // do a long running task echo $stopwatch->measure(); // displays // 00:00:00.034240 // 00:00:03.078050
Memory
Simple memory service to get peak and usage formatted.
echo '[' . Memory::usage() . ' / ' . Memory::peak() . ']'; // displays // [8.31 MB / 8.96 MB]