Skip to content
framework23 active rulesVerified 2026-09-30

Laravel .gitignore Template

Laravel framework vendor directory, storage logs, cache, and .env files. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Open in Full Generator
Search for templates
Quick add:
Selected1
Laravel
Selected Templates (1)
.gitignore
### Laravel ###
/vendor/
node_modules/
npm-debug.log
yarn-error.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
# Laravel 5 & Lumen specific with changed public path
public_html/storage
public_html/hot
storage/*.key
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache
/.phpunit.cache
/public/build
/storage/pail
.env.backup
.env.production
.phpactor.json
auth.json
23 rules1 template33 lines
Deterministic

Raw Laravel .gitignore

Crawlable upstream source template
laravel.gitignore32 lines
/vendor/
node_modules/
npm-debug.log
yarn-error.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
# Laravel 5 & Lumen specific with changed public path
public_html/storage
public_html/hot
storage/*.key
.env
Homestead.yaml
Homestead.json
/.vagrant
.phpunit.result.cache
/.phpunit.cache
/public/build
/storage/pail
.env.backup
.env.production
.phpactor.json
auth.json

Key Pattern Breakdown

Dependencies & Packages

Excludes installed package directories and third-party vendor files that should be restored via package managers.

/vendor/node_modules/

Build & Compilation Artifacts

Ignores compiled binaries, intermediate object files, and build output directories generated during development.

/public/build

Environment & Secrets

Prevents leaking sensitive local credentials, API keys, database URLs, and environment configuration files.

storage/*.key.env.env.backup.env.productionauth.json

Cache & Temporary Files

Ignores compiler caches, test runner coverage data, and transient temporary scratch files.

npm-debug.logyarn-error.log.phpunit.result.cache/.phpunit.cache

Source & Verification

License:: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.