https://github.com/rokde/laravel-utilities
Some laravel or php related utilities
https://github.com/rokde/laravel-utilities
Last synced: 11 months ago
JSON representation
Some laravel or php related utilities
- Host: GitHub
- URL: https://github.com/rokde/laravel-utilities
- Owner: rokde
- License: mit
- Created: 2024-02-06T14:43:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-12T07:19:54.000Z (about 1 year ago)
- Last Synced: 2025-05-12T08:41:59.927Z (about 1 year ago)
- Language: PHP
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Utilities
[](https://packagist.org/packages/rokde/laravel-utilities)
[](https://github.com/rokde/laravel-utilities/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/rokde/laravel-utilities/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/rokde/laravel-utilities)
Some laravel or php related utilities.
composer require rokde/laravel-utilities
## Stopwatch
A simple stopwatch to measure the time between operations.
```php
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.
```php
echo '[' . Memory::usage() . ' / ' . Memory::peak() . ']';
// displays
// [8.31 MB / 8.96 MB]
```