This repository was archived by the owner on Jan 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +105
-3
lines changed
Expand file tree Collapse file tree 7 files changed +105
-3
lines changed Original file line number Diff line number Diff line change 11build
22composer.lock
3- docs
43vendor
54coverage
65.idea
Original file line number Diff line number Diff line change 1717 ],
1818 "require" : {
1919 "php" : " ^7.1" ,
20- "illuminate/support" : " 5.6.*|5.7.*|5.8.*|^6.0"
20+ "illuminate/support" : " 5.6.*|5.7.*|5.8.*|^6.0|^7.0 "
2121 },
2222 "require-dev" : {
23- "orchestra/testbench" : " ^3.6|^3.7|^3.8|^4.0" ,
23+ "orchestra/testbench" : " ^3.6|^3.7|^3.8|^4.0|^5.0 " ,
2424 "phpunit/phpunit" : " ^7.0|^8.0" ,
2525 "spatie/phpunit-snapshot-assertions" : " ^1.3|^2.0"
2626 },
Original file line number Diff line number Diff line change 1+ ---
2+ packageName : Laravel View Xray
3+ githubUrl : https://github.com/beyondcode/laravel-view-xray
4+ ---
Original file line number Diff line number Diff line change 1+ ---
2+ title : Disabling Xray
3+ order : 2
4+ ---
5+
6+ ## Disabling Xray
7+
8+ You can disable Xray by setting an environment variable called ` XRAY_ENABLED ` to ` false ` .
9+
10+ If you want to customize how xray should be enabled/disabled, you can publish the package configuration file using:
11+
12+ ``` bash
13+ php artisan vendor:publish --provider=BeyondCode\\ ViewXray\\ ViewXrayServiceProvider
14+ ```
15+
16+ And modify the ` enabled ` key in the configuration file.
Original file line number Diff line number Diff line change 1+ ---
2+ title : Excluding views
3+ order : 3
4+ ---
5+
6+ # Excluding views
7+
8+ If you want to exclude certain views from being processed by Xray, you can do this by adding them to the configuration file.
9+
10+ Publish the configuration file using:
11+
12+ ``` shell
13+ php artisan vendor:publish --provider=BeyondCode\\ ViewXray\\ ViewXrayServiceProvider
14+ ```
15+
16+ This will publish a file called ` xray.php ` in your ` config ` folder.
17+
18+ This is the content of the configuration file:
19+
20+ @verbatim
21+ ``` php
22+ return [
23+
24+ /*
25+ * Determines if the Xray package should be enabled.
26+ */
27+ 'enabled' => env('XRAY_ENABLED', true),
28+
29+ /*
30+ * If you want to exclude certain views from being processed by Xray,
31+ * you can list them here. Be aware that the check only applies to the
32+ * root views that you add here. If these views include other views
33+ * themselves, they need to be excluded manually.
34+ */
35+ 'excluded' => [
36+ //
37+ ],
38+
39+ ];
40+ ```
41+ @endverbatim
Original file line number Diff line number Diff line change 1+ ---
2+ title : VueJS support
3+ order : 10
4+ ---
5+
6+ # FAQ
7+
8+ To make this package work in combination with VueJS you need to enable comments in your VueJS app.
9+
10+ This package works by adding specific HTML comments into the rendered views and uses
11+ these comments to find the bounding boxes of the rendered HTML. VueJS by default removes HTML comments prior to rendering.
12+
13+ You can enable HTML comments in your VueJS app by setting ` comments ` to ` true ` :
14+
15+ ``` javascript
16+ let app = new Vue ({
17+ el: ' #content' ,
18+ comments: true
19+ });
20+ ```
Original file line number Diff line number Diff line change 1+ ---
2+ title : Installation
3+ order : 1
4+ ---
5+ ![ Example output] ( https://beyondco.de/github/xray/xray.png )
6+
7+ # Installation
8+
9+ You can install the package via composer:
10+
11+ ```
12+ composer require beyondcode/laravel-view-xray --dev
13+ ```
14+
15+ Please make sure that you install this package as a dev dependency, as it could expose your internal view structure to others.
16+
17+ The package is enabled by default - so all you need to do is visit your application in the browser and hit the Xray shortcut.
18+
19+ - Windows: CTRL + Shift + X
20+ - OSX: CMD + Shift + X
21+
22+ This toggles the Xray view, where you can see which view (and optionally section) rendered the visual output.
You can’t perform that action at this time.
0 commit comments