Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Blade Lint

Laravel Blade Lint Laravel Package

magentron/laravel-blade-lint

Laravel Blade Lint validates Blade templates and reports syntax errors, malformed directives, and other template issues before they reach production. Use its Artisan command locally or in CI to keep views clean and catch mistakes early.

Deep Wiki
Context7

magentron/laravel-blade-lint adds a lightweight Artisan command for validating Laravel Blade templates before they reach production. It compiles views to catch syntax errors and malformed directives, helping you detect broken templates during development or CI without rendering every page.

  • Run Blade lint checks via Artisan
  • Catch syntax errors and invalid directives early
  • Compile templates without executing application views
  • Suitable for local workflows and CI pipelines
  • Simple installation and Laravel integration
Frequently asked questions about Laravel Blade Lint
What is magentron/laravel-blade-lint used for?
It provides an Artisan command that lints Blade templates by compiling .blade.php views to catch syntax errors and invalid directives before deployment. It is a dev-only quality gate, similar in role to php -l, PHPUnit, or Pint. It does not touch the request lifecycle, container, or data layer.
How do I install laravel-blade-lint in a Laravel app?
Install it as a development dependency with composer require --dev magentron/laravel-blade-lint. Then run the provided Artisan command locally or in CI. Because it is dev-only, you can remove it with composer remove --dev without production impact.
Which Laravel and PHP versions does magentron/laravel-blade-lint support?
The context does not provide a confirmed Laravel or PHP version matrix, so check the package metadata and CI before committing. Confirm that its constraints match the Laravel and PHP versions your application uses. This matters because Blade's compiler is internal API and changes across Laravel majors.
How do I run laravel-blade-lint in CI and what exit code does it return?
Add the Artisan command to CI as a static-analysis step alongside PHPUnit, Pint, or php -l. Verify the exit code on failure and whether it provides machine-readable output for CI annotations before making it blocking. If the view tree has many pre-existing failures, run it advisory or scope it to changed files first.
Does laravel-blade-lint catch missing variables or undefined components?
No, this is a syntax and directive lint check, not view test coverage. It will not reliably catch missing variables, undefined components, wrong slot usage, authorization gaps, or name-based @include of a nonexistent view. Do not treat a passing lint run as proof that your Blade views are functionally correct.
Can laravel-blade-lint handle custom Blade directives and namespaced views without a database?
It depends on how much Laravel bootstrapping the command needs to resolve view paths, view namespaces, and registered custom directives. Test it against your real views, including directives from your app and packages such as Livewire, Inertia, or Filament, and classify false positives. Also verify whether it can run in a bare container or requires database, cache, or environment access.
Is magentron/laravel-blade-lint safe to use as a dev dependency in production?
It is a dev-only, run-and-exit quality gate, not a runtime dependency, so it should not affect production requests. You can remove it with composer remove --dev and have zero production impact. Still treat it as an unvetted third-party dependency and pin the version with a committed composer.lock.
What license does laravel-blade-lint use and is GPL-3.0 okay for internal tooling?
The package is GPL-3.0, which is a copyleft license. Dev-only use that is not distributed is often considered acceptable internally, but legal sign-off is required for your distribution model. It becomes material if you vendor, fork, patch, or ship the package inside a distributed artifact such as a Docker image, starter kit, or packaged product; compare MIT or Apache alternatives in that case.
Is magentron/laravel-blade-lint actively maintained and trustworthy?
The repository is listed as unknown and the package has about 16 stars, so maintainer identity, CI status, test coverage, and security disclosure process cannot be confirmed from the context. Treat it as an unvetted third-party dependency and pin it with a committed composer.lock. Because Blade's compiler is internal API, a small single-maintainer lint tool has a realistic chance of going stale across Laravel majors.
How does laravel-blade-lint compare to php -l, Laravel Pint, or PHPUnit?
php -l checks PHP syntax and Pint handles code style, while laravel-blade-lint targets Blade template compilation and directive syntax. It complements those tools but does not replace PHPUnit view tests or functional coverage. Use it as an additional dev-only gate, especially for large resources/views trees with heavy @include, @component, or @each usage.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo