A practical collection of production-ready building blocks for Laravel applications. Laravel Toolkit combines typed measurements, ACL, stored assets, SEO and sitemap generation, FilePond uploads, deployment helpers, validation rules, and small framework extensions behind one package.
Use only the features your application needs. The service provider is discovered automatically and registers the package configuration, routes, migrations, commands, views, translations, and macros.
Important
The Vue, Inertia, and PrimeVue examples use the companion Vuetoolkit package. Backend-only features do not require it.
- PHP 8.4 or newer
- Laravel 12 or 13
- Inertia Laravel 3
- PHP extensions: BCMath, DOM, and Intl
- Vuetoolkit 2.x only when using the companion frontend components
| Laravel Toolkit | Laravel | Inertia Laravel | Vuetoolkit |
|---|---|---|---|
| 3.x | 12.x, 13.x | 3.x | 2.x |
| 2.x | 11.x, 12.x | 2.x | 1.x |
| 1.x | 11.x, 12.x | 1.x, 2.x | — |
Install the package with Composer:
composer require wsssoftware/laraveltoolkitPublish the configuration when you need to change defaults:
php artisan vendor:publish --tag=laraveltoolkit-configFeatures backed by database tables, such as ACL and Stored Assets, also need the package migrations:
php artisan vendor:publish --tag=laraveltoolkit-migrations
php artisan migrateThe package is a toolkit rather than a single workflow. These examples show a few features that work immediately after installation:
use Illuminate\Support\Number;
use Illuminate\Support\Str;
use Laraveltoolkit\Measurement\Enums\LengthUnit;
use Laraveltoolkit\Rules\DocumentRule;
length(2.54, 'cm')->to(LengthUnit::MILLIMETER)->value(); // 25.4
Str::applyMask('12345678901', '000.000.000-00'); // 123.456.789-01
Number::spellCurrency(42.50, in: 'BRL', locale: 'pt_BR');
$request->validate([
'document' => ['required', DocumentRule::both()],
]);For an application feature, choose a guide below and follow its setup section.
| Feature | What it provides |
|---|---|
| Measurements | Precise value objects, conversion, formatting, arithmetic, and Eloquent casts for ten measurement dimensions. |
| ACL | Database-backed policies and roles integrated with Laravel Gate and optional Vue components. |
| Stored Assets | Recipe-driven file storage, Eloquent casts, multiple asset variants, and garbage collection. |
| Utilities | CPF/CNPJ and phone validation, enum helpers, regex utilities, framework macros, and extended fluent objects. |
| Feature | What it provides |
|---|---|
| PrimeVue Data | Server-side filtering, sorting, and pagination for PrimeVue DataTable and DataView. |
| FilePond | Temporary, chunked uploads with request conversion to Laravel uploaded files. |
| Flash | Chainable session messages consumed by the Vuetoolkit PrimeVue toast receiver. |
| Multi-domain Inertia | Cross-domain Inertia redirect handling and the required CORS setup. |
| Feature | What it provides |
|---|---|
| SEO | Server- and client-rendered metadata, Open Graph, Twitter cards, robots directives, and robots.txt. |
| Sitemap | Cached XML sitemaps, domain-specific entries, query chunking, and sitemap indexes. |
| Deploy | Two-stage deployment commands and a broadcast-aware Inertia maintenance page. |
See the documentation index for the complete guide map and common setup commands.
All package settings live in config/laraveltoolkit.php after publishing. They are grouped by feature:
deploy: maintenance route and deployment actionsflash: default lifetime, closability, and toast groupfilepond: temporary disk, path, and garbage collectionseo: metadata defaults and propagationsitemap: routes, caching, timeouts, and XML limitsstored_assets: disk, model, paths, naming, and trash retention
Only publish the configuration when you need to override these defaults.
composer testCode style can be checked and fixed with:
composer formatContributions are welcome. Read the contribution guide before opening a pull request.
See the changelog for release history and upgrade notes.
Please report security vulnerabilities through the repository's private security advisory form, not a public issue.
Laravel Toolkit is open-source software licensed under the MIT license.