Jump to content

Rasheed4u

New Members
  • Posts

    4
  • Joined

  • Last visited

Community Answers

  1. Rasheed4u's post in How to show post title instead of single.php/Id=3 in URL was marked as the answer   
    If you don't know anything kindly shut the fucck off. I explained that the free hosting was to verify issues before finally going live on premium. Stop being unnecessarily rude and condescending to strangers MF.
    As for the question above, I have gotten a solution. Anyone with similar issue can use this code
    // get all posts
    $posts = Post::all(); 
     
    // loop through all posts
    foreach ($posts as $post) { 
      // convert the title into a slug and save it to the slug field  
      $post->slug = Str::slug($post->title); 
     
      // save the post  
      $post->save(); 
    }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.