Category: Laravel, PHP

It’s just came on my mind. I’m not looking for like authenicated users nor if someone changed the URL’s Id and visit someone’s for that we have auth() or middlewares. Looking for if someone using a Slug(pretty url’s) instead of a Id for giving a clear understand of a url path, for that if someone changes that slug name or remove a word or letter form it then it’s show exception or errors.

Like: Initially my correct slug name is “Lamda”: Then If someone changes it to “lama”: To get rid of this and over 5–6 days surfuring , got some idea how to implement.

if(isAvailable($slug)){ //code..yours else { return back(); } and returns back if the slug name is not matching.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners