PHPackages                             bardh78/laravel-wisra - 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. [Templating &amp; Views](/categories/templating)
4. /
5. bardh78/laravel-wisra

ActiveLibrary[Templating &amp; Views](/categories/templating)

bardh78/laravel-wisra
=====================

Inject HTML comments into compiled Blade templates showing view file paths. Useful for debugging and IDE integration (e.g. Wisra).

v0.1.0(1mo ago)01↑2900%MITPHPPHP ^8.2

Since Mar 19Pushed 1mo agoCompare

[ Source](https://github.com/bardh78/laravel-wisra)[ Packagist](https://packagist.org/packages/bardh78/laravel-wisra)[ Docs](https://github.com/bardh78/laravel-wisra)[ RSS](/packages/bardh78-laravel-wisra/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Laravel Wisra
=============

[](#laravel-wisra)

Inject HTML comments and attributes into compiled Blade templates to expose view file paths and source line numbers. Useful for debugging, IDE integration (e.g. [Wisra](https://github.com/laravel/wisra)), and **AI/LLM-assisted development**.

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

[](#installation)

Install via Composer:

```
composer require bardh78/laravel-wisra
```

The package auto-discovers its service provider. No additional setup required.

### Configuration (optional)

[](#configuration-optional)

Publish the config file to customize behavior:

```
php artisan vendor:publish --tag=config
```

Or publish only this package's config:

```
php artisan vendor:publish --provider="Bardh78\LaravelWisra\LaravelWisraServiceProvider"
```

Environment variables:

VariableDefaultDescription`LARAVEL_WISRA_ENABLED``true`Enable or disable the instrumentation`LARAVEL_WISRA_LOCAL_ONLY``true`Only run in the local environment> **Note:** After enabling or disabling Wisra, clear the compiled view cache so changes take effect:
>
> ```
> php artisan view:clear
> ```

What it does
------------

[](#what-it-does)

- **View path comments** — Wraps each compiled view with `` and ``
- **Line annotations** — Adds `wisra-start-line` and `wisra-end-line` attributes to HTML elements for source mapping
- **Translation comments** — Wraps `__()` and `trans()` echoes with `` for easier translation debugging

How LLMs benefit from it
------------------------

[](#how-llms-benefit-from-it)

When AI coding assistants (Cursor, Copilot, Claude, etc.) work with your Laravel app, they often need to:

1. **Inspect rendered output** — Via browser tools, DOM snapshots, or page source
2. **Map HTML back to source** — Find which Blade file and line produced a given element
3. **Suggest precise edits** — Know exactly where to change code

**Without Laravel Wisra:** The assistant sees raw HTML with no trace to the Blade source. It must guess files, search the codebase, or rely on structure alone.

**With Laravel Wisra:** The rendered HTML includes:

- **Exact file paths** in comments, so the assistant knows which view file to edit
- **Line numbers** on elements via `wisra-start-line` and `wisra-end-line`, so it can target the correct line
- **Translation file paths** for `__()` calls, so it can update the right lang file

### Example

[](#example)

Rendered HTML with Wisra:

```

  Welcome to our app

```

An LLM can now:

- Open `resources/views/welcome.blade.php` and edit around lines 5–12
- Open `lang/en/welcome.php` to change the translation for the heading
- Avoid searching or guessing which files to modify

### Best practices for LLM workflows

[](#best-practices-for-llm-workflows)

1. **Enable in local/dev** — Keep `local_only` true so production HTML stays clean
2. **Use with browser MCP tools** — When the assistant inspects the page, it gets file/line hints
3. **Combine with Cursor rules** — Mention that view comments are present so the assistant knows to use them

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10.x, 11.x, or 12.x

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance89

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

54d ago

### Community

Maintainers

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

---

Top Contributors

[![bardh78](https://avatars.githubusercontent.com/u/85450418?v=4)](https://github.com/bardh78 "bardh78 (5 commits)")

---

Tags

laraveldebugbladeviewbardh78wisra

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bardh78-laravel-wisra/health.svg)

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

###  Alternatives

[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[spatie/laravel-blade-comments

Add debug comments to your rendered output

177325.5k](/packages/spatie-laravel-blade-comments)[stijnvanouplines/blade-country-flags

A package to easily make use of country flags in your Laravel Blade views.

26307.2k6](/packages/stijnvanouplines-blade-country-flags)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

219.2k](/packages/leitsch-kirby-blade)

PHPackages © 2026

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