UNPKG

@rzl-zone/ziggy-route

Version:

Typed Laravel route generator for any frontend — works with React, Vue, Vanilla JS, and other JavaScript-based stacks.

36 lines (33 loc) 969 B
/*! * ==================================================== * Rzl Ziggy-Route. * ---------------------------------------------------- * Version: 0.0.15. * Author: Rizalvin Dwiky. * Repository: https://github.com/rzl-zone/ziggy-route. * ==================================================== */ import { route } from '../chunk-FY7J5NOI.esm.js'; import '../chunk-IWMGSFDN.esm.js'; var rzlZiggyVue = { /** ------------------------------------------------------- * * ***Rzl **Ziggy Route** Install Route to Vue.*** * ------------------------------------------------------- */ install: function(app, options) { function rt(name, params, absolute) { return route(name, params, absolute, options); } if (parseInt(app.version) > 2) { app.config.globalProperties.route = rt; app.provide("route", rt); } else { app.mixin({ methods: { route: rt } }); } } }; export { rzlZiggyVue };