Download the PHP package based/momentum-trail without Composer

On this page you can find all versions of the php package based/momentum-trail. 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 momentum-trail

Momentum Trail

Momentum Trail is a Laravel package that provides a TypeScript route() helper function that works like Laravel's, making it easy to use your Laravel named routes in TypeScript with auto-completion and type-safety.

The package is built on top of Ziggy.

Installation

Laravel

Install the package using composer.

You can publish the config file with:

This is the contents of the published config file:

Set the paths according to your directory structure. You can set the routes path to null in case you plan to use the Blade directive instead of importing JSON.

Frontend

Install the frontend package.

Usage

Run the following command to generate TypeScript declarations and make your routes available on the frontend.

Register your routes on the frontend. You can either import the generated JSON definition and pass it to the defineRoutes method within the entry point (app.ts) or use the @trail Blade directive to register routes in the window object and make them available globally.

Vue 3

Alternatively, you can register routes using a Vue 3 plugin.

Server-side rendering

The SSR engine doesn't know the current URL you are requesting.

To make the method current work correctly on the initial page load, you must pass the initial URL to the options list.

Blade

Optionally, add the @trail Blade directive to your main layout (before your application's JavaScript).

By default, the output of the @trail Blade directive includes a list of all your application's routes and their parameters. This route list is included in the HTML of the page and can be viewed by end users.

Import the helper in your .vue files and enjoy perfect autocompletion and type-safety for both route and current methods.

The route helper function works like Laravel's — you can pass it the name of one of your routes, and the parameters you want to pass to the route, and it will return a URL.

For the complete documentation please refer to Ziggy.

Auto-generation

The package works best with vite-plugin-watch plugin. You can set up the watcher to run the command on every file change.

Advanced Inertia

Take your Inertia.js skills to the next level with my book Advanced Inertia. Learn advanced concepts and make apps with Laravel and Inertia.js a breeze to build and maintain.

Momentum

Momentum is a set of packages designed to improve your experience building Inertia-powered apps.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of momentum-trail with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^8.24|^9.0|^10.0|^11.0
tightenco/ziggy Version ^2.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 based/momentum-trail contains the following files

Loading the files please wait ....