1. Home
  2. Laravel
  3. Route helper

Use route helper to return a full url to a named route. You can pass parameters in the second argument for the dynamic parts of the url.

// With a single parameter
route('shop', $product->slug)
// Or an array of parameters
route('shop', ['product' => $product->slug, 'title' => $product->name])
Full Laravel cheatsheet