If you're storing the slug in the database, you can just use the unique rule on the slug column.
Oct 16, 2017
6
Level 3
Check teams slug with custom validator
Hi,
I want to check if the slug of a team is colliding with a existing route. I plan to add routes for every team like {team-slug}.domain.tld and domain.tld/{team-slug}. I want to add this check with a custom validator but i can't find the existing slug validation. I know there must be some validation as a slug currently is unique and it gets formed by teamname.
Level 3
Ok I finally found it. It is located here:
/vendor/laravel/spark/src/Interactions/Settings/Teams/CreateTeam.php
Please or to participate in this conversation.