datalogix / laravel-utils
A Laravel package that provides a set of useful utilities and service providers to enhance your application.
Requires
- php: ^8.2
- datalogix/laravel-builder-macros: ^5.1
- datalogix/laravel-error-pages: ^2.0
- datalogix/laravel-sensible: ^2.0
- datalogix/laravel-validation: ^4.0.1
- illuminate/support: ^12.0|^13.0
Requires (Dev)
- larastan/larastan: ^3.14
- laravel/pint: ^1.30
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.8|^4.7|^5.3
- phpunit/phpunit: ^11.5|^12.0|^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v6.1.0
- v6.0.0
- v5.8.0
- v5.7.0
- v5.6.0
- v5.5.0
- v5.4.0
- v5.3.0
- v5.2.0
- v5.1.0
- v5.0.1
- v5.0.0
- v4.4.0
- v4.3.0
- v4.2.0
- v4.1.0
- v4.0.0
- v3.20.0
- v3.19.0
- v3.18.0
- v3.17.0
- v3.16.0
- v3.15.0
- v3.14.0
- v3.13.0
- v3.12.0
- v3.11.0
- v3.10.0
- v3.9.0
- v3.8.0
- v3.7.0
- v3.6.0
- v3.5.0
- v3.4.0
- v3.3.0
- v3.2.0
- v3.1.0
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.2.0
- v2.1.0
- v2.0.0
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
This package is auto-updated.
Last update: 2026-11-13 12:41:07 UTC
README
A Laravel package that provides a set of useful utilities and service providers to enhance your application.
Requirements
- PHP 8.2 or higher
- Laravel 12 or 13
Installation
You can install the package via composer:
composer require datalogix/laravel-utils
The package will automatically register itself.
Features
These features work out of the box, with no additional configuration:
- 🌍 Multi-language support: Laravel's built-in translations (
auth,pagination,passwords,validationand JSON strings) for English (en) and Brazilian Portuguese (pt_BR). They are loaded automatically, and any key your application defines in its ownlang/folder takes precedence. Translations for Respect Validation rules and error pages are provided by their own packages. - ✔️ Respect Validation integration: Respect Validation rules through datalogix/laravel-validation, with zero setup.
- 🧠 Query builder macros: reusable macros for cleaner, more expressive queries, powered by datalogix/laravel-builder-macros.
- 🧩 Sensible defaults: opinionated, production-ready defaults for performance, security and testability, powered by datalogix/laravel-sensible.
- 🚨 Error pages: ready-to-use, customizable error pages, powered by datalogix/laravel-error-pages.
Helpers
statesBR(); // ['AC' => 'Acre', 'AL' => 'Alagoas', ..., 'TO' => 'Tocantins']
Translations
To customize the translations, publish them:
php artisan vendor:publish --tag="laravel-utils-lang"
This copies the package's whole lang folder into your application's lang/ folder. Published keys take precedence over the package and no longer receive its updates; keys added to the package later are still loaded from it. Existing files are not overwritten; use --force to replace them (this discards your edits).
Note
The lang tag still works but is deprecated and will be removed in the next major version. Use laravel-utils-lang instead.
Translations shipped by the bundled packages are published through their own tags:
php artisan vendor:publish --tag="laravel-validation-lang" php artisan vendor:publish --tag="error-pages-lang"
Changelog
See GitHub Releases.
License
The MIT License (MIT). See LICENSE.