onelegstudios / laravel-tailor
The artisan tool to customize your Laravel starter kits.
Fund package maintenance!
Requires
- php: ^8.3
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/fortify: ^1.34
- laravel/pint: ^1.14
- laravel/tinker: ^3.0
- livewire/flux: ^2.12
- livewire/livewire: ^4.1
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^11.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.1
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
This package is auto-updated.
Last update: 2026-04-22 03:55:55 UTC
README
Standard starter kits are great, but they often require 30 minutes of "massaging" before you can actually start coding. Tailor automates that process, ensuring every project starts with your specific best practices.
- ⚡️ Fast: Transform your kit in seconds.
- 🛠 Modular: Choose only what you need.
- 🏗 Scalable: Built with Laravel 13 and Livewire in mind.
Installation
You can install the package via composer:
composer require onelegstudios/laravel-tailor --dev
Usage
After requiring this package in your Laravel application and installing a Laravel starter kit, run the tailor command to apply your preferred modifications:
php artisan tailor:install
You will be prompted to select which modifications to apply. Laravel Tailor currently ships with:
- Use Lucide icons
Use Lucide Icons
tailor:use-lucide-icons migrates supported Flux icon usage to published Lucide icon components.
When you run it, Tailor:
- scans
resources/viewsfor supported Flux icon references - publishes the mapped Lucide icon Blade files into
resources/views/flux/icon - rewrites supported literal icon usages.
- leaves unresolved dynamic icon expressions unchanged and reports each one as a warning instead of guessing
- adds Tailor's package
@sourcedirective toresources/css/app.csswhen that file exists, so Tailwind can see the package views used by the published icons
Icon names are resolved from Tailor's icon mapping configuration. The default mappings cover common Flux-to-Lucide translations such as loading to loader-circle and exclamation-triangle to triangle-alert.
If you only want to run the icon migration you can call the command directly:
php artisan tailor:use-lucide-icons
Custom icon mappings
If you want to use different Lucide icons than Tailor's defaults, publish the package config first:
php artisan vendor:publish --tag=tailor-config
This creates config/tailor.php. From there, update icons.mappings to point Flux icon names at the Lucide icons you want to publish.
'icons' => [ 'mappings' => [ 'plus' => 'circle-plus', 'users' => 'users-round', 'layout-grid' => 'layout-grid', ], ],
Map a Flux icon name to any Lucide icon name you want Tailor to publish. If you want to keep an icon name unchanged but still make sure its Lucide Blade view is published, map it to itself.
Package Development
Do not run this when installing Laravel Tailor in your own application. Package consumers only need to install the package and run php artisan tailor:install inside their Laravel project.
Refreshing the Testbench workbench with the latest starter-kit version
If you are developing or contributing to this package, you can refresh the local Testbench workbench with:
php bin/refresh-workbench.php
This command is for package development only. It regenerates the local workbench/ application from the latest Livewire starter kit, rebuilds the Testbench workbench, reinstalls the workbench frontend dependencies, and builds the Vite manifest used by testbench serve.
Syncing Flux icons to config file
When bin/refresh-workbench.php changes Flux icon usage in the workbench views, refresh the package icon map with:
php bin/sync-flux-icon-map.php
This script scans workbench/resources/views for Flux icon references and updates the package config/tailor.php file under icons.mappings. It preserves unrelated Tailor config, keeps any explicit icon mappings you have already defined, adds newly detected icons with null targets, always includes Flux internal icons such as loading and exclamation-triangle, and writes icons.removed when older mappings are no longer detected.
Run it after changing package Blade views or Flux icon migration behavior so the default package icon configuration stays aligned with the current workbench templates.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.