Download the PHP package jaydeep/laravel-xray without Composer

On this page you can find all versions of the php package jaydeep/laravel-xray. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-xray

Laravel X-Ray

[Laravel]() [PHP]() [License]() [Stars]()

Understand large Laravel applications at a glance. X-Ray statically scans your source code — without executing it — and reports on controllers, models, routes, views, services, middleware, and form requests, detecting dead code and mapping dependency relationships.

Result

Features

Requirements

Installation

The service provider is auto-discovered. If auto-discovery is disabled, register it manually in config/app.php:

Commands

Command What it does
xray:scan Full health scan — terminal summary, plus an HTML report on every run
xray:architecture Controller dependency trees and detected layers (class analyzers only, so it's fast)
xray:deadcode Unused controllers, models, views, and services
xray:report Writes report files with no interactive output — for CI and scheduled runs
Option Available on Description
--json scan, architecture, deadcode Print the result as JSON to stdout
--save scan, architecture, deadcode Write report files to output_path
--mermaid architecture Print the Mermaid diagram (saves only with --save)
--format= report json, markdown, mermaid, html, or all (default)
--path= all Override the base path used to resolve scan directories

Dependency trees are rendered with box-drawing characters:

Output files

Everything is written to output_path (default storage/app/project-xray):

File Written by Contents
xray-report.html xray:scan (always), xray:report Self-contained Bootstrap 5 dashboard — stat cards, dead code, routes table, dependency tree, model relationships
scan-report.json xray:scan --save, xray:report Full scan data — components, architecture, dead code, summary
scan-report.md xray:scan --save, xray:report Markdown report, good for pull requests
architecture.json xray:architecture --save, xray:report Dependency trees and layers only
architecture.mmd xray:architecture --save, xray:report graph TD flowchart + classDiagram, renderable on GitHub, GitLab, or mermaid.live
deadcode.json xray:deadcode --save, xray:report Dead code results only

Configuration

config/xray.php:

Key Default Purpose
paths.controllers app/Http/Controllers Controller files
paths.models app/Models Eloquent model files
paths.services app/Services Service class files
paths.repositories app/Repositories Repository class files
paths.views resources/views Blade templates
paths.routes routes/ Route files (web.php, api.php, …)
paths.middleware app/Http/Middleware Middleware files
paths.form_requests app/Http/Requests Form Request files
output_path storage/app/project-xray Where reports are saved (created if missing)
ignore ['Controller.php'] File basenames excluded from every analyzer

Each path must be an absolute directory — use app_path(), base_path(), resource_path(), or a plain string. Subdirectories are scanned recursively, so non-standard or modular layouts just need the right parent:

Add abstract base classes to ignore to keep them out of dead code results:

Dead code detection

Type Reported when the short class / view name is…
Controllers Not referenced by any parsed route
Models Not found in the content of any other scanned class or route file
Views Not found via view(), View::make(), @include, @extends, or @component
Services / Repositories Not a constructor dependency anywhere, and not present in any other class's content

Detection is heuristic — always verify before deleting. Common false positives: models used only through DB::table() or raw queries, dynamically built view names (view('emails.' . $template)), services injected by interface, and code outside the configured scan paths.

CI and scheduling

Troubleshooting

Problem Solution
"No controllers detected" Check the resolved path: php artisan tinkerconfig('xray.paths.controllers')
Command not found Run php artisan package:discover, or register the provider manually
Empty Mermaid diagram No controller has typed constructor dependencies to graph
Reports not saved output_path is not writable — chmod -R 775 storage/
--path= has no effect Supply an absolute path, and ensure Http/Controllers etc. exist beneath it
Scan fails with a PHP error A scanned file has a syntax error — X-Ray uses token_get_all(), which needs valid PHP

Testing

License

MIT © Jaydeep Gadhiya


All versions of laravel-xray with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0|^8.1|^8.2|^8.3|^8.4
illuminate/console Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/filesystem Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jaydeep/laravel-xray contains the following files

Loading the files please wait ...