# Laravel Package Toolkit > Build Laravel packages without the boilerplate. Describe config, routes, migrations, views, assets and commands through one fluent API. Version 2.4.1. Requires PHP ^8.2 and Laravel 12.x (>= 12.61.1) or 13.x (>= 13.12.0). A package built on the toolkit describes itself once, in `configure(Packager $packager)`, and the base provider does the register, boot and publish work. Every `hasX()` on the description has a matching `bootX()` or `publishX()` on the provider, and any of them can be overridden. - Index of every page, with descriptions: https://package-toolkit.nyoncode.cz/llms.txt - Every page in one file: https://package-toolkit.nyoncode.cz/llms-full.txt - Raw Markdown of any page: append `.md` to its URL - Shipped with the package, and therefore always matching the installed release: `vendor/nyoncode/laravel-package-toolkit/ai/AGENTS.md`, a Claude Code skill, and an MCP server that answers from the installed source. Install all three with `vendor/bin/package-toolkit-ai install`. ## Prologue - [Overview](https://package-toolkit.nyoncode.cz/index.md): Laravel Package Toolkit turns the boilerplate of a Laravel package service provider into one fluent description of what your package ships. - [Installation](https://package-toolkit.nyoncode.cz/installation.md): Add the toolkit to your Laravel package, wire up auto-discovery, and lay out the directories the defaults expect. - [Upgrade guide](https://package-toolkit.nyoncode.cz/upgrade.md): What changed in each release, what breaks, and what to do about it. ## Getting started - [Quickstart](https://package-toolkit.nyoncode.cz/quickstart.md): Build a complete Laravel package — config, routes, migrations, views, an install command — from an empty directory. - [The service provider](https://package-toolkit.nyoncode.cz/service-provider.md): What PackageServiceProvider does during register() and boot(), in the exact order it does it, and every hook you can override. - [The Packager](https://package-toolkit.nyoncode.cz/packager.md): Names, short names, base paths and the file resolver every hasX() method shares. - [Lifecycle hooks](https://package-toolkit.nyoncode.cz/lifecycle-hooks.md): Run your own code at the four moments the toolkit wires a package up — registering, registered, booting and booted. - [Conditional configuration](https://package-toolkit.nyoncode.cz/conditional-configuration.md): Register resources only in certain environments, only when a class exists, or only in the console. ## Config & routing - [Config](https://package-toolkit.nyoncode.cz/config.md): Merge your package's configuration into the application and make it publishable. - [Routes](https://package-toolkit.nyoncode.cz/routes.md): Load your package's route files and let consumers publish them for customisation. - [Broadcast channels](https://package-toolkit.nyoncode.cz/broadcast-channels.md): Register channel authorization callbacks with the broadcaster, without smuggling them through a route file. - [Middleware](https://package-toolkit.nyoncode.cz/middleware.md): Register middleware aliases, push middleware into groups, or add it globally. ## Database - [Migrations](https://package-toolkit.nyoncode.cz/migrations.md): Ship timestamped or timeless migrations, publish them in the right order, or run them without publishing at all. - [Seeders](https://package-toolkit.nyoncode.cz/seeders.md): Publish database seeders flat into the application's seeders directory, so db:seed finds them without rewiring. - [Factories](https://package-toolkit.nyoncode.cz/factories.md): Publish model factories into the application's factories directory — and why publishing is the only option Laravel leaves. ## Views & assets - [Views](https://package-toolkit.nyoncode.cz/views.md): Register your package's Blade views under a namespace and let consumers override them by publishing. - [View components](https://package-toolkit.nyoncode.cz/view-components.md): Register class-based Blade components individually, with aliases, or a whole namespace at a time. - [View composers & shared data](https://package-toolkit.nyoncode.cz/view-composers.md): Bind data to specific views when they render, or share a value with every view in the application. - [Translations](https://package-toolkit.nyoncode.cz/translations.md): Ship PHP and JSON translation files, namespaced under your package's short name, with language-code validation built in. - [Assets](https://package-toolkit.nyoncode.cz/assets.md): Ship CSS and JavaScript, render them from a template with one directive, and let the consuming application's Vite build take over when it wants to. ## Commands & wiring - [Commands](https://package-toolkit.nyoncode.cz/commands.md): Register your package's Artisan commands — discovered automatically, listed explicitly, or constructed by hand. - [Events](https://package-toolkit.nyoncode.cz/events.md): Register event listeners and subscribers from your package's configuration. - [Optimize commands](https://package-toolkit.nyoncode.cz/optimize.md): Hook your package's cache-warming and cache-clearing commands into php artisan optimize and optimize:clear. - [Stubs](https://package-toolkit.nyoncode.cz/stubs.md): Publish generator stubs into stubs/your-package so consumers can customise what your make: commands scaffold. - [Publishable providers](https://package-toolkit.nyoncode.cz/providers.md): Ship a service provider template that consumers publish into app/Providers and own from then on. ## Distribution - [Publishing](https://package-toolkit.nyoncode.cz/publishing.md): Every publish tag, where each resource lands, and how to change the tag format. - [The install command](https://package-toolkit.nyoncode.cz/install-command.md): Give your users php artisan your-package:install — with presets, hooks, conditional publishing and progress output. - [The about command](https://package-toolkit.nyoncode.cz/about-command.md): Add your package's version and diagnostic data to php artisan about. ## Reference - [API reference](https://package-toolkit.nyoncode.cz/api-reference.md): Every public method on Packager, PackageServiceProvider, InstallCommand and the support classes, on one page. - [Testing](https://package-toolkit.nyoncode.cz/testing.md): Test a package built with the toolkit using Orchestra Testbench and Pest — including the static-state reset that makes provider tests repeatable. - [AI agents](https://package-toolkit.nyoncode.cz/ai.md): Give the coding agent working on your package an accurate, version-matched description of the toolkit — a guide in vendor, a Claude Code skill, and an MCP server. ## Optional - [Source repository](https://github.com/NyonCode/laravel-package-toolkit) - [Changelog](https://github.com/NyonCode/laravel-package-toolkit/blob/main/CHANGELOG.md) - [Agent guide, rendered on GitHub](https://github.com/NyonCode/laravel-package-toolkit/blob/main/ai/AGENTS.md)