kyledoesdev / essentials
Essentials for my Laravel applications.
Requires
- php: ^8.4|^8.5
- illuminate/contracts: ^12.0|^13.0
- illuminate/http: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- spatie/laravel-package-tools: ^1.16
- spatie/laravel-stats: ^2.3
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.0.0|^11.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
This package is auto-updated.
Last update: 2026-08-01 22:14:47 UTC
README
Essential utilities for my Laravel applications — the helpers, macros and generators I'd otherwise copy between projects.
Installation
composer require kyledoesdev/essentials
Features
Timezone detection — timezone() resolves the timezone for the current request from the authenticated user, an IP geo lookup, then config('app.timezone'). Results are cached per IP address.
Carbon macro — Carbon::parse($date)->inUserTimezone() shifts an instance into that timezone.
Action generator — php artisan make:action CreateUserAction scaffolds action classes into app/Actions.
Developer middleware — IsDeveloper aborts with a 403 unless the authenticated user has is_dev.
Model stats — HasStatsAfterEvents records created and deleted counts through spatie/laravel-stats.
String helpers — toSafeFileName() strips characters that break downloads.
Configuration
php artisan vendor:publish --tag=essentials-config
Requirements
- Laravel 12+
- PHP 8.4 / 8.5
License
essentials is open-sourced software licensed under the MIT license.
Credits
Created by kyledoesdev