Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

How to use Slug For Custom Url

Slug is used to define custom Url based on the title .it gives users SEO-friendly way to access it through the URL.

http://holidaylandmark/city/Mumbai

Creating Slug Field in Table:

Syntax:

Save Slug in Database using store function

Pass Slug id in Button

Use Slug Id In Show Function

Setting Slug IN Routing

Click Image To Show Slug

http://holidaylandmark/city/Mumbai

mumbai city is slug url