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.

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