Package

Tightenco Ziggy

Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript.

Package

tightenco/ziggy

View on GitHub →

Overview

What Tightenco Ziggy does

Ziggy bridges the gap between Laravel's server-side routing and JavaScript environments by exporting Laravel routes to JavaScript, allowing developers to use a route() function similar to Laravel's natively.

The primary advantage of Ziggy is that it enables developers to seamlessly integrate Laravel routes into their JavaScript code. By using the @routes Blade directive, it outputs a comprehensive list of all named routes, allowing front-end applications to generate URLs with the same convenience found in the backend.

Developers can pass route names and parameters to the JavaScript route() function, mirroring the Laravel experience in web and single-page applications. Ziggy also extends its functionality with a Router class, enabling operations like checking the current route, verifying existence, and retrieving route parameters, which enhances dynamic client-side navigation without resorting to hard-coded paths.

Ziggy's ability to handle route-model binding allows it to harmonize Laravel's sophisticated routing capabilities with JavaScript needs, ensuring consistent parameter resolution across the stack. The package supports popular JavaScript frameworks like Vue and React, providing an easy setup to access Laravel routes directly in component templates.

By supporting TypeScript with type definitions and strict route name checking, Ziggy caters to developers looking for robust development tools. This makes Ziggy a compelling choice for those working with complex Laravel applications who need synchronized routing logic in their client-side code.

This overview was generated by AI from the package README and may not reflect the latest release.

Read the full README →

Tightenco Ziggy Related Articles

Ziggy: A Package for Named Laravel Routes in JavaScript image

Ziggy: A Package for Named Laravel Routes in JavaScript

Read article
Easily deleting old soft-deleted records with Quicksand image

Easily deleting old soft-deleted records with Quicksand

Read article
Built with Jigsaw – the Ultimate Showcase of Web Sites Built with Jigsaw image

Built with Jigsaw – the Ultimate Showcase of Web Sites Built with Jigsaw

Read article
Use Collections outside Laravel image

Use Collections outside Laravel

Read article
Building your website using Jigsaw image

Building your website using Jigsaw

Read article
Takeout by Tighten image

Takeout by Tighten

Read article

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing