Download the PHP package evanschleret/laravel-typebridge without Composer

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

Laravel TypeBridge

Deterministic TypeScript generation from Laravel resources.

Packagist Version Packagist Downloads License PHP >= 8.2 Laravel 12.x | 13.x

Why this package

This package helps you keep backend resources and frontend types aligned, with deterministic output and predictable imports.

Requirements

Installation

Publish the config:

Generated file:

Basic usage

Generate files:

Use another output directory:

Preview only (no write):

Generate and remove stale .ts files:

Generate only selected resources:

Generate everything except selected resources:

Check generated files in CI:

Attribute example

Use TypeBridgeResource on Laravel resources (JsonResource or ResourceCollection):

Optional attribute fields:

@relation(name) is strict:

If the relation exists but no generated TypeScript type is available for the related model, the field falls back to any or any[].

@enum(Fully\\Qualified\\EnumClass) generates a TypeScript literal union from PHP enum cases.

Configuration

Published default config

This is the default config generated by vendor:publish:

Advanced config example (API wrappers + aliases)

This is an example, not the default:

Additional outputs

output.additional_paths are generated on every typebridge:generate call when --output-path is not used.

If you use --output-path, additional paths are skipped unless you pass --with-additional-paths.

With RoleItem, this can generate:

Naming placeholders

For files.naming_pattern:

Example:

Template placeholders

Inside append_templates.*.lines:

Override rules

Roadmap

Other packages

If you want to explore more of my Laravel packages:

Open source


All versions of laravel-typebridge with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/console Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/filesystem Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/support Version ^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 evanschleret/laravel-typebridge contains the following files

Loading the files please wait ...