{"id":13828484,"url":"https://github.com/beyondcode/laravel-view-xray","last_synced_at":"2025-07-09T06:32:02.312Z","repository":{"id":45628097,"uuid":"141561573","full_name":"beyondcode/laravel-view-xray","owner":"beyondcode","description":"Take a look into your Laravel views","archived":true,"fork":false,"pushed_at":"2023-02-24T19:22:57.000Z","size":53,"stargazers_count":566,"open_issues_count":1,"forks_count":27,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-11T01:27:43.468Z","etag":null,"topics":["blade-template","laravel","xray"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beyondcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-07-19T10:09:26.000Z","updated_at":"2024-10-01T21:28:26.000Z","dependencies_parsed_at":"2024-01-15T18:45:05.737Z","dependency_job_id":"2cc4a3b3-8ebd-4bfa-8ccb-207a1d3e4020","html_url":"https://github.com/beyondcode/laravel-view-xray","commit_stats":{"total_commits":13,"total_committers":5,"mean_commits":2.6,"dds":0.3076923076923077,"last_synced_commit":"9acdecf0cec95d036dccaa57d32564d6e1b04bc4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondcode%2Flaravel-view-xray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondcode%2Flaravel-view-xray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondcode%2Flaravel-view-xray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyondcode%2Flaravel-view-xray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyondcode","download_url":"https://codeload.github.com/beyondcode/laravel-view-xray/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225492420,"owners_count":17482869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blade-template","laravel","xray"],"created_at":"2024-08-04T09:02:48.815Z","updated_at":"2024-11-20T08:30:37.478Z","avatar_url":"https://github.com/beyondcode.png","language":"PHP","funding_links":[],"categories":["PHP","Packages"],"sub_categories":["Development Tools"],"readme":"# Xray - Take a look into your Laravel views\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/beyondcode/laravel-view-xray.svg?style=flat-square)](https://packagist.org/packages/beyondcode/laravel-view-xray)\n[![Build Status](https://img.shields.io/travis/beyondcode/laravel-view-xray/master.svg?style=flat-square)](https://travis-ci.org/beyondcode/laravel-view-xray)\n[![Quality Score](https://img.shields.io/scrutinizer/g/beyondcode/laravel-view-xray.svg?style=flat-square)](https://scrutinizer-ci.com/g/beyondcode/laravel-view-xray)\n[![Total Downloads](https://img.shields.io/packagist/dt/beyondcode/laravel-view-xray.svg?style=flat-square)](https://packagist.org/packages/beyondcode/laravel-view-xray)\n\nWhen 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.\nWith 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.\n\n![Example output](https://beyondco.de/github/xray/xray.png)\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require beyondcode/laravel-view-xray --dev\n```\n\nThe package is enabled by default - so all you need to do is visit your application in the browser and hit the Xray shortcut.\n\n- Windows: CTRL + Shift + X\n- OSX: CMD + Shift + X\n\nThis toggles the Xray view, where you can see which view (and optionally section) rendered the visual output.\n\n## Disabling Xray\n\nYou can disable Xray by setting an environment variable called `XRAY_ENABLED` to `false`.\n\n## Excluding views\n\nIf you want to exclude certain views from being processed by Xray, you can do this by adding them to the configuration file.\n\nPublish the configuration file using:\n\n```bash\nphp artisan vendor:publish --provider=BeyondCode\\\\ViewXray\\\\ViewXrayServiceProvider\n``` \n\nThis will publish a file called `xray.php` in your `config` folder.\n\nThis is the content of the configuration file:\n\n```php\n\u003c?php\n\nreturn [\n\n    /*\n     * Determines if the Xray package should be enabled.\n     */\n    'enabled' =\u003e env('XRAY_ENABLED', true),\n\n    /*\n     * If you want to exclude certain views from being processed by Xray,\n     * you can list them here. Be aware that the check only applies to the\n     * root views that you add here. If these views include other views\n     * themselves, they need to be excluded manually.\n     */\n    'excluded' =\u003e [\n        //\n    ],\n\n];\n```\n\nJust place the view names that you want to exclude in the `excluded` array.\n\n## FAQ\n\n- Does this work with VueJS too?\n\nYes, 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\nthese comments to find the bounding boxes of the rendered HTML. VueJS by default removes HTML comments prior to rendering.\n\nYou can enable HTML comments in your VueJS app by setting `comments` to `true`:\n\n```javascript\nlet app = new Vue({\n    el: '#content',\n    comments: true\n});\n```\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n### Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email marcel@beyondco.de instead of using the issue tracker.\n\n## Credits\n\nThis project is inspired by [xray-rails](https://github.com/brentd/xray-rails).\n\n- [Marcel Pociot](https://github.com/mpociot)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondcode%2Flaravel-view-xray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyondcode%2Flaravel-view-xray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyondcode%2Flaravel-view-xray/lists"}