Download the PHP package bmatovu/laravel-js-routes without Composer
On this page you can find all versions of the php package bmatovu/laravel-js-routes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bmatovu/laravel-js-routes
More information about bmatovu/laravel-js-routes
Files in bmatovu/laravel-js-routes
Package laravel-js-routes
Short Description Laravel Javascript routes.
License MIT
Homepage https://github.com/mtvbrianking/laravel-js-routes
Informations about the package laravel-js-routes
Laravel JS Routes.
This minimalistic package will help you access exisiting PHP routes via JavaScript.
Installation
Install via Composer package manager:
Setup
Set application URL in the environment file; .env
.
Add application URL to base layout head meta; usually in resources/views/layouts/app.blade.php
Generate routes
Routes will be written to a json file: resources/js/routes.json
You should .gitignore
the above auto-generated file.
Publish resources
Publish JavaScript router to resources/js
Using Webpack | Laravel Mix
Load JavaScript router; usually in resources/js/app.js
Using ViteJS
Compile JS routes
Usage
Sample Laravel (named) routes
In JavaScript; just get the route by name.
All versions of laravel-js-routes with dependencies
illuminate/console Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/routing Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/support Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0
illuminate/filesystem Version ^5.5|^6.0|^7.0|^8.0|^9.0|^10.0