« back published by @mmartin_joo on October 3, 2022

Top 20 Laravel Packages

I've used a lot of packages throughout the years and in this list I want to show you my all time favorites. They can be a huge help in almost any application.

laravel-excel

Check out this package

The single best package to handle Excel exports and imports:

  • Exporting collections
  • Storing files
  • Exporting from query
  • Queue jobs
  • And more
Laravel Excel

blueprint

Check out this package

With this package, you can define your models in a YAML file and it will generate:

  • Migrations
  • Models with relationships
  • Factories
  • CRUD Controllers
  • Routes
  • Form requests
  • Even Jobs, Mails, Events, or basic HTTP tests
Blueprint

laravel-data

Check out this package

If you’re using Data Transfer Objects or DTOs to handle data in your application, this is a must have:

  • DTO as request, response
  • Nested DTOs
  • Lazy loading properties
  • Validation rules
  • Easy mapping from requests or models
Laravel Data

phpinsights

Check out this package

This is my favorite static analysis tool. It scores your code base and gives you this beautiful page in terminal:

PHPInsights

laravel-query-builder

Check out this package

With this package, you can build Eloquent queries based on the Request. It can handle things like:

  • Filtering
  • Sorting
  • Including relationships
  • Sparse fieldsets

If you're interested in this package, make sure you understand Laravel custom query builders first.

Laravel Query Builder

larastan

Check out this package

It’s a pretty great static analysis tool on top of phpstan that integrates well with Laravel:

Larastan

has-many-deep

Check out this package

With this package, you can query deep relationships with a single SQL query.

Consider these relationships: Country → has many → User → has many → Post → has many → Comment

With this relationship you can query every comment to a country in just one query:

Has Many Deep

deptrac

Check out this package

You can keep your architecture clean with this static analysis tool. You can define what layer can use what other layers and it will force you to obey these rules.

It can be especially useful in legacy project if want to refactor:

Larastan

pest

Check out this package

The most amazing PHP testing framework built top on phpunit:

PestPHP

If you're interested in pest and testing in general, check out my book If you're interested in this package, make sure you understand Test-Driven APIs with Laravel and Pest.

clockwork

Check out this package

Debugbar on steroids. You can monitor:

  • Requests
  • Performance metrics
  • Log entries
  • DB queries
  • Cache queries
  • Redis commands
  • Events, jobs
  • ...and more
Clockwork

json-api

Check out this package

A package that implements the JSON API standard and makes your life easy.

This is what a JsonApiResource looks like:

JSON API

If you're not familiar with the JSON API standard, download Proper API Design with Laravel.

ziggy

Check out this package

This package makes it possible to use your Laravel named routes from your Javascript. It can be a Blade, an Inertia, or even a SPA application.

Pretty useful!

Clockwork

laravel-activitylog

Check out this package

A very convenient audit log package. It will log every activity in your application:

Laravrel Activity Log

laravel-ide-helper

Check out this package

The good old IDE helper! This package makes your IDE understand your models and Laravel classes. It gives you very nice autocompletion.

laravel-transporter

Check out this package

If you’re working with 3rd party APIs and services, you ABSOLUTELY need this package!

Laravel Transporter

request-factories

Check out this package

If you’re writing a lot of API or feature tests (which you should do, by the way) this package will save you hours when constructing request data:

Laravel Request Factory

laravel-backup

Check out this package

Another package from Spatie. With this one, your whole backup process should look like this:

php artisan backup:run

terminal

Check out this package

If you’re working with terminal commands you can use Symfony Process which is a pretty good component. Terminal takes it to another level:

Laravel Terminal

laravel-nestedset

Check out this package

Let’s be honest… We all hate hierarchical data structures and trees. Fortunately, this package saves us:

Laravel Nestedset

accountant

Check out this package

Another pretty impressive auditing and accountability package:

Laravel Accountant