Your Guide to Every Official Laravel Package and Service

May 7th, 2024

The Laravel Ecosystem is big. So big that when you start working with it, it's sometimes difficult to know which first-party packages are available, and which ones to reach for.

This guide overviews every official Laravel package and service — most free, some paid. Either way, you can confidently use any of these these to pull together a fully-featured application in no time.

Purpose: Starter kit

Breeze is the most lightweight starter kit for Laravel (except for the semi-deprecated UI starter kit). It offers authentication controllers and an account area for basic user management. Styled with Tailwind CSS and comes in several flavours (React, Vue, pure Blade templating) depending on your preferred stack.

Purpose: Starter kit

Jetstream is a more feature-rich starter kit for Laravel, akin to what you'd expect to need for real-world projects. It features authentication functionality but adds additional features missing from the Breeze starter kit, like two-factor authentication, session management, team functionality and an API using Laravel Sanctum. All the authentication functionality outside the framework's scope is powered by the frontend agnostic Fortify.

It provides several flavours, so you can, for example, build React applications with a Laravel backend using Inertia.

It can only be set up for new applications, so you'll need to set up a Jetstream project as your first step.

Purpose: Headless authentication

While Laravel ships with powerful authentication baked in, Fortify takes this a step further and provides more functionality. It's frontend agnostic, so you can use all the features of Fortify with any stack you choose.

Some of the features provided by Fortify include registration, two-factor authentication and password confirmation (for sensitive actions).

Purpose: Billing management

Spark is a billing management package for Laravel. It's built on Cashier and integrates into Jetstream or Breeze to provide a billing management panel for SaaS applications. Once Spark is set up, you can define plans, allow users to subscribe, swap, manage payment methods and more.

It supports Stripe and Paddle, so you can start accepting payments immediately within your Laravel applications.

Purpose: Stripe interface

Cashier directly interfaces with the Stripe API and offers powerful functionality for any application that needs to take payments (either one-off or recurring). It also features metered billing functionality, trials and product checkout if you're building an e-commerce solution.

With Cashier, you must manually create routes, controllers, and the UI. If you'd prefer to avoid managing everything yourself, Spark is a pre-built billing management solution that uses Cashier under the hood.

Purpose: Starter kit

UI is a legacy package that provides authentication and UI scaffolding for Laravel projects. It supports Vue or React and uses the Bootstrap CSS framework for styling.

While no longer recommended for new Laravel projects, it's still maintained so will work for newer Laravel projects. A much better option is Breeze or Jetstream.

Purpose: Docker interface

Laravel Sail allows you to manage your local development environment with Docker without requiring much experience. Once Sail is installed, you can define containers for services like MySQL and Redis that your application can use.

Purpose: Local development environment

Laravel Herd is a desktop application that lets you quickly start working with Laravel. It provides almost everything you need to start developing with Laravel. If you prefer to avoid setting up everything yourself or want to avoid using Docker, Herd is a great option. It uses Valet under the hood to manage your local projects.

From Herd, you can create projects and have them instantly available at a .test domain on your local machine. From there, you can secure sites, share sites, manage PHP versions and more.

Herd is also available as a pro version, which additionally bakes in services like MySQL, PostgreSQL, Redis and more.

Purpose: Development environment

Once installed, Valet provides Nginx and DnsMasq to proxy all your local projects to .test domains. You can 'park' your local projects so they're instantly accessible in the browser.

There's no need to couple this with Herd, which uses Valet under the hood.

Purpose: Virtual machine provisioning

Homestead provides a Vagrant box packaged with the majority of software you need to start working with Laravel, including Nginx, MySQL, Redis, Node and more. It allows you to create an environment for local development, destroy it if needed, and re-provision.

It's a slightly older way to manage your local development environment, and unless you prefer using Vagrant over any other option, I'd recommend reaching for Sail or Herd instead.

Purpose: Framework

Although having a framework within a framework might sound confusing, Livewire changes how you build applications if you're using Blade (Laravel's templating system).

Within a Livewire component, you can write PHP as usual and have the UI 'react' to changes without writing JavaScript. Livewire components consist of a component PHP class and a Blade template, with communication between the two. In the simplest way possible, when something on the backend changes, the UI will be updated to reflect it.

Under the hood, the JavaScript functionality is powered by Alpine.js, written by the same author as Livewire. Because of this, you're also able to sprinkle in JavaScript which can also communicate directly with Livewire. Once you've got the hang of Livewire, you can build applications that feel like single-page applications.

Livewire forms part of the TALL stack (Tailwind, Alpine.js, Laravel and Livewire).

Purpose: Functional API for Livewire

Volt provides a functional API for Livewire, allowing you to create single-file Livewire components. Traditionally, Livewire requires a component PHP class and a blade template, but with Volt, you can do everything in a single file — kinda like how you'd write old-school PHP with code at the top and a template at the bottom.

Volt pairs nicely with Folio, allowing you to effectively create a single Blade file that automatically registers as a route, with all the Livewire functionality you need.

Purpose: Laravel bridge

In contrast to Livewire, if you prefer to build traditional single-page applications with Vue, React or Svelte — Inertia works as a bridge between these frameworks and Laravel. The difference is that Inertia works to glue everything together inside a monolith, so you don't have to create two separate applications.

Once Inertia is installed (either manually or via one of the Laravel starter kits), you can pass data to your frontend pages directly from your Laravel controllers and invoke routes directly from your frontend. Once this happens, props will automatically update so you see fresh data on the client.

If you don't want to build a separate Vue/React/Svelte client and manually interact with a Laravel API, go with Inertia.

Purpose: API tokens and SPA authentication

Sanctum has two uses that both relate to API authentication.

API tokens

Sanctum allows users to generate API tokens (similar to GitHub access tokens) that can be used to authenticate with an API. While it doesn't provide a UI to manage these, it includes all the functionality required to list, create and revoke tokens.

SPA authentication

If you're building a SPA and are not using Inertia, Sanctum can handle the authentication process when connecting to your API from your client. Instead of token-based authentication, Sanctum uses cookies to authenticate and provides configuration options for CORS, origin control and more.

Purpose: OAuth2 server

If your application needs to support OAuth2, Passport gives you a full OAuth2 server implementation directly within your Laravel application. With Passport, you're able to issue access tokens, refresh tokens, and do everything else you'd expect from an OAuth2 server.

You may not need Passport — it's recommended you use Sanctum instead if you want to authenticate with an SPA.

Purpose: OAuth provider wrapper

Suppose you want to add social authentication to your Laravel applications. In that case, Socialite allows you to easily configure and connect to these providers, kick off the authentication flow, and fetch information in a standardised format.

Once connected, you're able to use the data from each OAuth provider as required, for example, you may use this data to register users who can then begin to use your application.

Purpose: Search

Scout allows you to index your model data within your Laravel applications directly with a third-party search service or instance. Once installed, Scout will keep your model data in sync with a search engine like Algolia. You can also configure the structure of your indexed data, batch import, and add conditions around what data is indexed.

Purpose: WebSocket server

Reverb is a WebSocket server specifically for Laravel. With Laravel's built-in broadcasting functionality, you can push real-time updates to Reverb and listen for them on the client.

Reverb pairs well with Echo, which allows you to effortlessly pick up any messages you've broadcast to Reverb.

Purpose: WebSocket client

Echo is a JavaScript library that listens to WebSocket channels (including private channels) to pick up real-time events broadcasted from your Laravel application.

Laravel's built-in broadcasting functionality lets you push messages directly to services like Pusher or Reverb. Echo integrates into your front end to listen to and update your UI accordingly.

Purpose: Testing

Dusk is a browser automation testing package for Laravel. Once installed, you can use Dusk's API to visit pages within a headless Chrome browser, interact with the page, and make assertions. It offers an incredibly powerful way to perform end-to-end testing.

Purpose: Code style fixer

Pint is a style fixer that's included by default with Laravel installations. Running Pint will automatically fix up the style of your code but can also be configured with various options depending on your preferences.

Purpose: Application monitoring

Pulse is a highly customisable application monitoring dashboard, much like you'd find in third-party services. Pulse allows you to see application usage and server stats, monitor slow queries and routes, see exceptions and monitor your queues.

Pulse is straightforward to extend, so you can build cards or use cards built by the Laravel community.

Purpose: Redis queue dashboard

If you use Redis as your queue driver in Laravel, Horizon provides a configuration-driven queue worker and a dashboard to monitor your Redis queues.

Horizon allows you to fine-tune your queue workers depending on your application's needs and run a single command to register them, which are then ready for you to push jobs onto a queue.

The dashboard allows you to monitor metrics, pending/failed/completed jobs, and job batches — and you're even able to re-run jobs directly from the UI.

Purpose: Local development monitoring

Once installed, Telescope provides a dashboard to monitor incoming requests into your application. In a local development environment, this can be incredibly useful for checking database queries, number of requests, speed of requests, queues, notifications and any other action that Laravel performs.

Using Telescope in a production environment is not recommended, and you should instead reach for Pulse.

Purpose: Log viewer

Pail allows you to tail your Laravel application logs directly from the command line. It also works with other logging services you may have integrated into Laravel, like Sentry.

Once Pail is installed, you run a simple command that outputs a stream of your Laravel log entries.

Purpose: Command line forms

You may have noticed that when installing Laravel or issuing commands with artisan, everything looks... like real forms. That's thanks to Laravel Prompts, which provides a way to output form elements in either standalone command line applications, or commands you create within Laravel.

Prompts provides many pre-built form types (like textarea, password inputs and search), tables, progress bars, and plain old informational messages.

Purpose: Admin panel

Nova is a ready-made admin panel for Laravel. It hooks directly into your models, allowing you to instantly list, create, update and delete resources, including related models. It also provides search functionality, the ability to define actions, filters for your data and much more.

In each Nova resource, you can configure your model's fields with powerful, built-in field types, set validation rules for your dashboard, and customise how fields behave.

Purpose: Performance

Octane boosts the performance of your Laravel application by keeping your application code in memory on boot, so subsequent requests to your application are much faster.

It supports several application servers like FrankenPHP, Open Swoole, Swoole, and RoadRunner.

Envoy allows you to set up tasks that run shell commands on remote servers. Using Blade-like syntax, you're able to define multiple hosts and the commands to run on that host. It also supports conditional tasks (thanks to the fact it uses Blade syntax) and hooks.

Envoy is useful for running tasks for a deployment pipeline, but if you don't want to manage this yourself, Envoyer is a great option.

Purpose: Feature flags

Pennant is a feature flag package that allows you to control access to specific application features and incrementally roll them out to new users, with fine-grained control over the process.

As an example, you may roll out a new feature to a specific set of users only, or use Laravel's built-in Lottery functionality to roll out based on odds.

Purpose: Validation

Precognition provides live validation for your client (e.g. Vue) by anticipating the future HTTP request. Powerful validation is already baked into Laravel, and Precognition will send a pre-request to your backend to validate client-side data without executing your route's controller.

Pairs well with Inertia when using Vue or React, or when you're using Alpine.js with Blade.

Purpose: Page-based routing

Folio allows you to skip manually registering routes and creating controllers by creating Blade files that act as your application route structure. For example, creating a home.blade.php file automatically registers a /home route.

If you're working with Blade templating, this works well on its own, but it pairs well with Volt for single-file Livewire components.

Purpose: Provisioning and deployment

Forge is a service for provisioning servers on DigitalOcean, Vultr, Hetzner and other cloud providers. Once you're signed up, you can choose a provider, connect your account and provision various types of servers depending on your needs. This process sets up everything on your server so you can instantly deploy your Laravel applications.

Once you've provisioned a server on Forge, you're able to add one or more sites to that server and configure each one in detail. Because it's a Laravel product, it's incredibly easy to set up queue workers, manage your environment and set up a scheduler for Laravel's scheduling functionality, to name just a few.

Forge also allows you to deploy your applications, but you can also use Envoyer specifically for zero-downtime deployments.

Purpose: Deployment without downtime

Envoyer is a zero-downtime deployment service that deploys your applications in the background. It only switches to the new deployment live once everything has gone smoothly.

You can customise the deployment steps for your application, and the Envoyer deployment dashboard will show the status of each step whenever you deploy. It'll roll back to the last successful deployment if something goes wrong.

Forge integrates with Envoyer to simplify the process, but you can set it up manually if needed.

Purpose: Serverless deployments

Vapor is a serverless deployment platform for Laravel. Once signed up, you can define environments containing queues, databases, caches, and other resources and instantly deploy them to AWS.

Use Scout to sync your data to a third-party service (like Algolia) and then implement their client-side search functionality. You can also use a self-hosted Meilisearch server or any other service Scout supports.

You'll want to pick Livewire or Inertia for the base. Livewire has excellent built-in support for listening to events using Echo, and if you're using Inertia, you have free rein to implement Echo as you need.

Laravel has amazing built-in API functionality, and you can use Sanctum to authenticate with it.

If you need other services to be able to request data from your application users (e.g. if you're building a social network like X), use Passport to set up an OAuth2 server.

Use Inertia to combine your Laravel backend and any of these in one monorepo.

Create a separate Laravel API and client, and then authenticate using Sanctum, which uses cookie-based authentication for SPAs.

Use the Jetstream starter kit and install Spark to add user billing management.

That's a wrap for the vast ecosystem surrounding Laravel. Packages and services frequently pop up, so I'll keep this list up-to-date for reference.

Enjoy building with Laravel.

Thanks for reading! If you found this article helpful, you might enjoy our practical screencasts too.
Alex Garrett-Smith
Share :


No comments, yet. Be the first to leave a comment.