UNPKG

@rzl-zone/ziggy-route

Version:

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

38 lines (34 loc) 1.02 kB
/*! * ==================================================== * Rzl Ziggy-Route. * ---------------------------------------------------- * Version: 0.0.15. * Author: Rizalvin Dwiky. * Repository: https://github.com/rzl-zone/ziggy-route. * ==================================================== */ 'use strict'; var chunk7LH2HYNO_cjs = require('../chunk-7LH2HYNO.cjs'); require('../chunk-4M7PUXSA.cjs'); var rzlZiggyVue = { /** ------------------------------------------------------- * * ***Rzl **Ziggy Route** Install Route to Vue.*** * ------------------------------------------------------- */ install: function(app, options) { function rt(name, params, absolute) { return chunk7LH2HYNO_cjs.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 } }); } } }; exports.rzlZiggyVue = rzlZiggyVue;