skip to Main Content

MY Question without code so pls bear with me 🙂

Now in Laravel, you use for links of our app the slug to arrange the links of app. and youtube uses some letters and numbers I don’t know what it is for a video! like i0b2ejl7tXM

So what the difference in SEO if we use the unique code like youtube and we use the slug which is the name of the post?

2

Answers


  1. From what I’ve taken from this article and from my experience, of course it has a difference. The difference, a good URL will increase your post ranks in search engine. But, please keep in mind that SEO isn’t just it. Please take a look at this good diagram.

    SEO Diagram

    Login or Signup to reply.
  2. You can use a function to generate and decode strings for your routes.

    Routes:

    Route::get(/'{code}', 'YourController@yourMethod');
    

    Controller:

    public function yourMethod(Request $request, $code)
        {
            $decodedValue = decodingFunction($code)
            ...
        }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search