Por Oliver Servín en English

Get relative path with `route()` in Laravel

I needed to generate a relative path, but the Laravel route helper generates absolute paths by default.

Turns out it also accepts a third $absolute argument, and setting it to false generates an relative path instead.

// torchlight! {"lineNumbers": false}
route('page.show', $page->id);
// http://laravel.test/pages/1

route('page.show', $page->id, false);
// /pages/1