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?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2C0CoXQ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire