Download the PHP package eng-mmustafa/canopy without Composer

On this page you can find all versions of the php package eng-mmustafa/canopy. 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 canopy

🌿 Canopy

Beautiful, hierarchical API documentation for Laravel β€” powered by Scramble.

Scramble generates a great OpenAPI document automatically. Canopy adds what large APIs need: a nested, navigable, branded documentation explorer. Group your endpoints into a tree (Admin β†’ Users β†’ Sessions…), search them instantly, and ship docs that look like your product.

Canopy is a drop-in add-on. It depends on Scramble and does not modify or fork it β€” it builds on Scramble's public extension points, so you keep upgrading Scramble normally.


Why Canopy?


Requirements

Dependency Version
PHP ^8.1
Laravel ^10.0 \| ^11.0
dedoc/scramble ^0.13

Installation

Laravel auto-discovers the service provider. Then open:

Publish the config to customize:


Quick start

Step 1 β€” Install & visit

Visit /docs/canopy β€” Canopy auto-generates the tree from your existing Scramble setup.

Step 2 β€” Add Bearer token support (recommended)

Add this to your AppServiceProvider::boot() so TryIt shows an auth input on every endpoint:

Step 3 β€” (Large apps) Pre-export the document

For large codebases, generate the spec once instead of on every request:

Then add to .env:

Re-run the export whenever your API changes (e.g. in your CI/CD pipeline).


Grouping

Canopy resolves each endpoint's group in priority order. The first that matches wins:

1. #[Group] attribute (nested with / or >)

2. Config rules

Match conditions: prefix, name, middleware, namespace (all glob-matched).

3. Route prefix / name

Route::prefix('admin/billing') β†’ Admin β†’ Billing. Falls back to the dotted route name (admin.users.index β†’ Admin β†’ Users).

4. Controller name (fallback)

InvoiceController β†’ Invoice. Finally, the configurable fallback group (default General).


Branding

The user can also toggle dark/light mode at any time via the πŸŒ™ button in the sidebar header. Preference is saved in localStorage and overrides the config value.

Publish and customize the view:


Configuration reference

Key Default Description
enabled true Master switch. When false, Canopy registers nothing.
api 'default' Scramble API name (for multi-API setups).
memory_limit null PHP memory limit for the docs request only (e.g. '1024M', '-1'). null keeps the environment default.
document_path null Absolute path to a pre-exported OpenAPI JSON file. When set, Canopy serves it directly. Reads from CANOPY_DOCUMENT_PATH env var.
route.ui 'docs/canopy' Path of the explorer UI.
route.document 'docs/canopy.json' Path of the raw JSON document.
route.middleware ['web'] Middleware applied to both routes.
branding.title 'API Documentation' Sidebar heading and page title.
branding.logo null URL to a logo image shown in the sidebar.
branding.accent '#6366f1' Accent color (buttons, active states, focus rings).
branding.theme 'system' Initial theme: light or dark.
rules [] Ordered grouping rules (see Grouping section).
fallback 'General' Group name when no rule matches.

Large applications

On big codebases, generating the OpenAPI document on every web request can be slow or exhaust PHP memory.

Option 1 β€” Raise the memory limit:

Option 2 (Recommended) β€” Pre-export the document:

Add the export to your deploy script so docs stay in sync with your code.


How it works

  1. Scramble generates the OpenAPI document (unchanged).
  2. Canopy maps each documented operation back to its Laravel route.
  3. A resolver pipeline assigns each route a (possibly nested) group path.
  4. A tree builder assembles the hierarchy.
  5. The sidebar renders the tree; Stoplight Elements renders the operation detail.
  6. Clicking a sidebar link fires hashchange / popstate events that Stoplight's internal React Router picks up β€” no page reload.

No x-tree, no patched OpenApi, no forked Scramble β€” everything happens inside Canopy.


Testing


Changelog

Version Highlights
v0.2.2 Fix: hide Stoplight internal sidebar via JS polling so Canopy's sidebar is the only navigation.
v0.2.1 Feat: dark/light mode toggle button with localStorage persistence; redesigned sidebar UI.
v0.2.0 Fix: mount elements-api once, navigate via pushState + hashchange/popstate events.
v0.1.9 Fix: recreate elements-api on each click with hash pre-set.
v0.1.4 Feat: document_path + memory_limit config options for large apps.
v0.1.0 Initial release: tree grouping, Stoplight Elements integration.

License

MIT Β© Mohammed Mostafa. Built on top of the excellent Scramble by Roman Lytvynenko.


All versions of canopy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
dedoc/scramble Version ^0.13
illuminate/contracts Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.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 eng-mmustafa/canopy contains the following files

Loading the files please wait ...