Mahdyar's Blog

My Thoughts


Route paths and reserved usernames in Laravel

In this post, we’re going to make a rule that prevents users from registering with route paths and reserved usernames as their usernames in Laravel.

If you’ve decided to serve your user profiles in a way like this:


You may have noticed that it may cause some problems, for example, a user can choose “login” as his/her username and…, Boom!