PHPackages                             jasonmccallister/laravel-preset - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. jasonmccallister/laravel-preset

ActiveLibrary[Testing &amp; Quality](/categories/testing)

jasonmccallister/laravel-preset
===============================

Presets for Laravel applications with Docker, PHPCS, PHPUnit, and etc.

v1.0.2(6y ago)11201MITPHP

Since May 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/jasonmccallister/laravel-preset)[ Packagist](https://packagist.org/packages/jasonmccallister/laravel-preset)[ RSS](/packages/jasonmccallister-laravel-preset/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

Laravel Presets for Docker, PHPCS, and PHPUnit
==============================================

[](#laravel-presets-for-docker-phpcs-and-phpunit)

[![Latest Version on Packagist](https://camo.githubusercontent.com/424f3bfaef6eccbfdaf8efa8885103909db32f5ff49bf7ee11e38633194fac6b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61736f6e6d6363616c6c69737465722f6c61726176656c2d7072657365742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jasonmccallister/laravel-preset)[![Total Downloads](https://camo.githubusercontent.com/8e2c064911f81fa3971d8110797c7d113248ed35122dc8ba0c646e277c0afce7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a61736f6e6d6363616c6c69737465722f6c61726176656c2d7072657365742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jasonmccallister/laravel-preset)

This preset will install and prompt you to install Laravel official packages like Horizon and Telescope. This also includes a `Makefile` for helpful commands for local development and continous integration.

The overall goal is to make it as easy as possible to ship a project with Laravel using Docker, CI/CD, and PHPUnit testing.

### Docker

[](#docker)

Taking years of experience shipping PHP applications (both Craft CMS and Laravel) with Docker, this is a combination of lessons learned in one package.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require --dev jasonmccallister/laravel-preset
```

Usage
-----

[](#usage)

```
php artisan preset jasonmccallister
```

Follow the prompts on which database to use and what packages to include in the project.

Now all that is left is to run the following command:

```
make up
```

### Docker

[](#docker-1)

Running the preset command (`php artisan preset jasonmccallister`) will prompt you on the type of database you are going to use on the project. This will setup the Dockerfile and docker-compose file with the correct database dependencies.

There is a `.dockerignore` that will exclude the `vendor` and `node_modules` from the Docker Build Context. This is included to [improve the build times for Docker](https://docs.docker.com/engine/reference/builder/#dockerignore-file).

#### Dockerfile

[](#dockerfile)

The goal is to use the same `Dockerfile` for local development, CI/CD, and deploying a production image. By default only "production" OS packages are installed.

> PHP Extensions like xdebug can be installed but are not enabled by default, there is a `Makefile` command for that!

#### docker-compose.yaml

[](#docker-composeyaml)

To make development with Docker easier locally, we use the `docker-compose.yaml` to scaffold the creation of the database, queue, and redis instance. Docker Compose makes it really easy to spin all of your services up with one command.

There are a few things of note with this file:

- The volumes are tagged with `:cache` to [improve Docker's performance with macOS](https://docs.docker.com/docker-for-mac/osxfs-caching/#cached) specifically but has no impact on other operating systems
- There are lines commented out if you are not using Laravel Passport
- No image is specified for the app and queue containers, this will default to the root folders name. Instead the file will look at the Dockerfile and build the image if it cannot find it locally

#### Packages

[](#packages)

The preset will prompt you to install some recommended first-party packages.

1. [Laravel Dusk](https://github.com/laravel/dusk)
2. [Laravel Horizon](https://github.com/laravel/horizon)
3. [Laravel Telescope](https://github.com/laravel/telescope)
4. [Laravel Scout](https://github.com/laravel/scout)
5. [Laravel Socialite](https://github.com/laravel/socialite)

> Note: if you select to install Horizon, the preset will also prompt you to use the horizon command instead of `queue:work`. Again this is optional but recommended when using Horizon.

#### Makefile

[](#makefile)

The preset will also install a `Makefile` with a lot of helpful commands. Here is a list of available commands:

- `make build` will build an image
- `make composer` will install composer dependencies inside of a throw away docker container and copy to your local machine
- `make down` will stop, or shutdown, the projects services
- `make horizon` will run `php artisan horizon:install`
- `make logs` will show all of your serivces logs with the `--follow` flag
- `make migrate` will run `php artisan migrate` inside of the docker container
- `make migrate:fresh` will run `pap artisan migrate` inside of the docker container
- `make phpcs` will apply `.php_cs` fixes on the `app` directory
- `make phpunit` runs phpunit inside of the container, useful for CI/CD environments
- `make reports` runs phpunit with HTML code coverage inside the container
- `make scale` will scale your queue container up to 15 containers. Useful for testing concurrency of background jobs and queues locally
- `make seed` runs `db:seed` inside of your container
- `make ssh` will "ssh" you into the app container with a bash shell
- `make ssh-queue` the same as the `ssh` command but will give you a bash shell in the queue container
- `make tag` will tag your docker image
- `make tinker` runs `php artisan tinker` inside the app container
- `make telescope` will run `php artisan telescope:install`
- `make testdox` runs phpunit with the `--testdox` flag for prettier output
- `make up` is used to start all of your services
- `make xdebug` will install the xdebug PHP Extension inside of your app container

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jason McCallister](https://github.com/jasonmccallister)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

5

Last Release

2550d ago

Major Versions

v0.2.0 → v1.0.02019-05-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3727a5febf036e01928d7ab7b650fe7528e117255449ade6b34dff7142ef56f?d=identicon)[themccallister](/maintainers/themccallister)

---

Top Contributors

[![jasonmccallister](https://avatars.githubusercontent.com/u/5354908?v=4)](https://github.com/jasonmccallister "jasonmccallister (29 commits)")

---

Tags

dockerlaravellaravel-presetsphpcsphpunit

### Embed Badge

![Health badge](/badges/jasonmccallister-laravel-preset/health.svg)

```
[![Health](https://phpackages.com/badges/jasonmccallister-laravel-preset/health.svg)](https://phpackages.com/packages/jasonmccallister-laravel-preset)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[hotmeteor/spectator

Testing helpers for your OpenAPI spec

3021.4M1](/packages/hotmeteor-spectator)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)[botble/git-commit-checker

Check coding standard &amp; code syntax with Git pre-commit hook.

47186.4k1](/packages/botble-git-commit-checker)[guanguans/laravel-soar

SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。

2227.8k](/packages/guanguans-laravel-soar)[spurwork/spectator

Testing helpers for your OpenAPI spec

3021.5k](/packages/spurwork-spectator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
