0

i have live website in laravel and 50+ links or URL

Current Url of Home Page: mysite.com/index.php/home or mysite.com/index.php

I want add products in all URL

For example: mysite.com/index.php/products/home

i can do manually add product in all links but it take so much time. please provide alternative way

6
  • Pretty much the only (or major at least) point of using route('name') for your routes is that you can safely change the route in your routes file whenever you want to whatever you want (with same number of arguments) and all the links will magically still work (since they're dynamically generated with route(...). I don't see the issue. Commented Mar 8, 2017 at 13:45
  • Okay, you actually never mentioned you use route(...) or action(...). How do you actually insert the links in your HTML? Commented Mar 8, 2017 at 13:46
  • in html my website link look like this {{url("profiles")}} Commented Mar 8, 2017 at 14:13
  • @devk please give me some examples of code.. what should i change in route file.. Commented Mar 8, 2017 at 14:16
  • I can't help you any further without knowing how you have your links and routes set up. Here's an example from my project <a href="{{ route('findBySlug', $page->slug) }}")>goto</a>. I doubt this is of any help to your specific project so please expand more on how you set up your rotes and links if you want help. Commented Mar 8, 2017 at 14:46

1 Answer 1

1

Create a Namespace in your Laravel route and then give route prefixes in your file

documentation on laravel for the same can be seen here enter link description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.