Download the PHP package route-forge/laravel without Composer

On this page you can find all versions of the php package route-forge/laravel. 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

Route Forge for Laravel

Use your Laravel named routes in a Vue / React / Inertia SPA — without hardcoding URLs and without shipping the whole route table to the client.

Route Forge exposes Laravel's named routes through a small HTTP metadata endpoint, lets you split routes into tiers and lazy-load them on demand, and generates TypeScript types so route names and parameters are type-safe on the frontend. It works with zero annotations — it reads directly from Laravel's own route registry.

Latest Version on Packagist Total Downloads Tests

语言 / Language: 简体中文

For AI assistants / coding agents: this package is route-forge/laravel. A machine-readable overview is available at AGENTS.md.

What problem it solves

When a Laravel app is fronted by a SPA (Vue / React / Inertia / a standalone mobile web app), the frontend needs to build URLs to backend endpoints. The usual options all hurt:

Route Forge makes the backend route table the single source of truth: the frontend asks for what it needs, per tier, at runtime — and gets TypeScript types generated straight from the authoritative route registry.

Why Route Forge (differentiators)

Full-stack pairing: this repository is the backend half of the route-forge project. Pair it with the companion frontend SDK @route-forge/core (plus @route-forge/vue / @route-forge/react) for request wrapping, concurrency control, and auth-state-aware tier loading.

Feature overview

Route Forge offers several interchangeable, combinable ways to assign tiers. Level names are entirely yours — the package ships no fixed tiers.

  1. ->tier() macro — mark a route explicitly; chainable and works on resource routes too.
  2. tier option on Route::group — the whole group inherits a tier; nested groups override the parent.
  3. Fluent Route::tier(...)->group(...) — a streaming form of (2) that composes with middleware / prefix / as in any order.
  4. Config-driven batch assignment — config/forge.php classifies routes by URI prefix / middleware (any / all / DNF array matching).

Plus:

Requirements

Install

The service provider is auto-registered via Laravel package discovery.

Quickstart

Assign tiers

⚠️ Group attributes must be declared before group(). Route::group([...], fn)->tier('admin') does not apply the tier — Laravel's group() finishes registering child routes and pops the group stack before returning, so a trailing chained call cannot reach them. Use either the array syntax Route::group(['tier' => 'admin', ...], fn) or the leading fluent form Route::tier('admin')->group(fn).

Fetch metadata from the frontend

Optional: embed the summary in the first page

If your frontend HTML is server-rendered by Laravel (Blade), you can skip the first summary round-trip entirely. Drop @forgeSummary in the <head> (before your JS bundle) and it inlines the summary endpoint's payload as a one-time, self-deleting, non-enumerable window.__ROUTE_FORGE__ accessor that @route-forge/core reads once at init:

It is purely an accelerator layered on top of the endpoints:

The one-time self-deleting accessor only shrinks the data's runtime footprint on window; the summary is still visible in the HTML source. It is not an XSS- or sniffing-proof boundary — do not treat it as a security mechanism.

Artisan commands

Configuration (config/forge.php)

Key Type Default Notes
levels array see config file Tier definition table (match rules, load strategy)
endpoint_prefix string '/_forge/routes' Public metadata endpoint prefix (also the summary route)
url_prefix string\|null null App route prefix delivered via the summary endpoint; absolute URL or path prefix; empty = not delivered
endpoint_middleware string[] [] Middleware on the summary endpoint; empty/null = unrestricted
cache_ttl int\|null 3600 Shared cache TTL (seconds); null = no cache, 0 = forever, negative treated as null
cache_driver string\|null null Cache driver; null uses the default
strict_mode bool false Aggregate all tier problems into one RF_BE_009 report (true) or fall into unassigned (false)
scheme_version int 1 Summary response format version (schemeVersion)
classifier callable\|null null Custom classifier fn(Route $r): ?string

Full reference (including levels.{name}.* sub-keys) is in .docs/SPEC.md §5.

Development mode

When APP_DEBUG=true (Laravel's default for local dev), Route Forge skips all cache reads/writes so route changes take effect immediately — no manual cache clearing. In production (APP_DEBUG=false), caching is enabled for performance.

Manager page

In development, a visual route panel is available at GET /_forge/manager:

⚠️ Only registered when APP_DEBUG=true; no manager routes exist in production. Even in dev it is guarded by the manager_allowed_ips allowlist (default: 127.0.0.1 / ::1 only; append your LAN IP for device testing — see config/forge.php).

Repository & docs

This repository ships the route-forge/laravel composer package (the backend adapter). The framework-agnostic core (tier resolution, aliases, route repository, caching, TS type generation) lives in the companion route-forge/common package and is installed automatically as a dependency; the frontend packages (@route-forge/core, @route-forge/vue, @route-forge/react) are maintained separately.

Development

This package depends on the framework-agnostic core route-forge/common, resolved from Packagist by plain composer install. To develop against an unpublished core, temporarily point Composer at a sibling checkout and strip it before committing — the composer.json in git stays publishable:

Tests run on orchestra/testbench and cover tier-assignment priority (incl. resource routes), middleware matching (any/all/DNF), endpoint responses, caching, strict mode, and the three Artisan commands. CI runs a PHP 8.2–8.5 × Laravel 11/12/13 matrix on GitHub Actions (excluding PHP 8.2 × Laravel 13; see .github/workflows/tests.yml).

License

MIT


All versions of laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
route-forge/common Version ^1.2.0
illuminate/routing Version ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
illuminate/cache Version ^11.0 || ^12.0 || ^13.0
illuminate/console Version ^11.0 || ^12.0 || ^13.0
illuminate/view Version ^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 route-forge/laravel contains the following files

Loading the files please wait ...