jeudi 28 décembre 2017

Laravel: How to override route helper function for a named route

I have working on predeveloped Laravel-5.x project and I need to change lots of URLs from:

route('product.show', ['id'=> $product->id), 'title' => $product->title])

to

route('product.show', ['id'=> encode_id($product->id), 'title' => slug_title($product->title)])

If I don't want replace all the 'product.show' routes to new version, is there any way to override route helper function for 'product.show' to generate new URL?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire