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

Preconfigured with Laravel
Search for templates
Quick add:
Selected1
Laravel
Selected Templates (1)
.gitignore
23 rules
### 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
33 lines•UTF-8
Deterministic

Raw Laravel .gitignore

Crawlable upstream source template
laravel.gitignore•32 lines•UTF-8
/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 & Package Registries

External libraries and package manager directories installed locally rather than stored in version control.

/vendor/node_modules/

Build Outputs & Compiled Artifacts

Generated binary files, compilation targets, and distribution bundles that can be reliably reproduced from source.

/public/build

Environment Secrets & Local Overrides

Local environment configurations, secrets, and credentials intended to protect developer-specific settings from exposure.

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

Execution Caches & Runtime Logs

Diagnostic logs, runtime metadata, test coverage reports, and incremental compiler caches that cause noisy repository diffs.

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.