Laravel package generator

Download a Laravel 13 package skeleton with a service provider, package discovery and passing tests. Choose what it includes. The archive is built in your browser.

Package
Your Packagist or GitHub name, in lowercase.
Lowercase words joined by dashes.
What to include

composer.json

After you download it

unzip invoice-kit.zip && cd invoice-kit
git init
composer install
composer test

The package requires PHP 8.3 or newer and Laravel 13, which is what Laravel 13 itself requires. The archive is built in your browser. Nothing you type is sent anywhere.

Try it inside an app before you publish

Point a Laravel app at the folder with a path repository. Composer links the folder into vendor, so your edits take effect at once.

composer config repositories.local path ../invoice-kit
composer require acme/invoice-kit:@dev

Laravel finds the service provider through the extra.laravel section of the package's composer.json. There is nothing to register by hand.

How the service provider is laid out

  • register() merges the package's config with the app's copy, so a published file only needs the keys it changes. It also binds the main class.
  • boot() offers the config for publishing and loads the routes, views, migrations and commands you chose.
  • Config is read with config('invoice-kit.key'). Avoid env() outside the config file: it returns null once the app caches its configuration.

Publishing on Packagist

  1. Push the repository to GitHub and tag a release, such as v1.0.0.
  2. Submit the repository URL at packagist.org/packages/submit. There is no review step.
  3. Connect your GitHub account in Packagist so new tags appear automatically.

Laravel also ships an official starting point, laravel package my-package in the Laravel installer. Use whichever layout you prefer; the conventions are the same.

Sources: Laravel 13 package development, the Composer schema and Packagist.

Building a SaaS on Laravel? Start with the foundation already built.

Stack Toast is a Laravel 13 starter kit with authentication, billing through four payment processors, teams and a complete admin panel. Choose Livewire, React, Vue or API.

  • From $199, one payment
  • Full GitHub source
  • Unlimited projects
  • 30-day money-back guarantee
The Stack Toast admin dashboard with revenue and subscription metrics