beyondcode/laravel-view-xray
最新稳定版本:1.4.0
Composer 安装命令:
composer require beyondcode/laravel-view-xray
包简介
Take a look into your Laravel views.
README 文档
README
When your Laravel project grows, so do the Laravel views. Sometimes it might be hard to figure out, which part of the output HTML was rendered using which template. With this package, you can take a peek into your Laravel views and find out which template is responsible for which part of the output HTML.
Installation
You can install the package via composer:
composer require beyondcode/laravel-view-xray --dev
The package is enabled by default - so all you need to do is visit your application in the browser and hit the Xray shortcut.
- Windows: CTRL + Shift + X
- OSX: CMD + Shift + X
This toggles the Xray view, where you can see which view (and optionally section) rendered the visual output.
Disabling Xray
You can disable Xray by setting an environment variable called XRAY_ENABLED to false.
Excluding views
If you want to exclude certain views from being processed by Xray, you can do this by adding them to the configuration file.
Publish the configuration file using:
php artisan vendor:publish --provider=BeyondCode\\ViewXray\\ViewXrayServiceProvider
This will publish a file called xray.php in your config folder.
This is the content of the configuration file:
<?php return [ /* * Determines if the Xray package should be enabled. */ 'enabled' => env('XRAY_ENABLED', true), /* * If you want to exclude certain views from being processed by Xray, * you can list them here. Be aware that the check only applies to the * root views that you add here. If these views include other views * themselves, they need to be excluded manually. */ 'excluded' => [ // ], ];
Just place the view names that you want to exclude in the excluded array.
FAQ
- Does this work with VueJS too?
Yes, this package does work in combination with VueJS, but you need to enable comments in your VueJS app. This package works by adding specific HTML comments into the rendered views and uses these comments to find the bounding boxes of the rendered HTML. VueJS by default removes HTML comments prior to rendering.
You can enable HTML comments in your VueJS app by setting comments to true:
let app = new Vue({ el: '#content', comments: true });
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email marcel@beyondco.de instead of using the issue tracker.
Credits
This project is inspired by xray-rails.
License
The MIT License (MIT). Please see License File for more information.
beyondcode/laravel-view-xray 适用场景与选型建议
beyondcode/laravel-view-xray 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 108.78k 次下载、GitHub Stars 达 567, 最近一次更新时间为 2018 年 07 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「beyondcode」 「laravel-view-xray」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 beyondcode/laravel-view-xray 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 beyondcode/laravel-view-xray 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 beyondcode/laravel-view-xray 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Add Server-Timing header information from within your Laravel apps.
Perform various self diagnosis tests on your Laravel application.
Marcel Pociot's based beyondcode/laravel-visual-diff adapted for Laravel 7
A PHP SDK for building Claude Code hooks.
Add comments to your Laravel application
An easy to launch a Pusher-compatible WebSockets server for Laravel.
统计信息
- 总下载量: 108.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 569
- 点击次数: 20
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-07-19