How to validate a database column on uniqueness in Laravel

You can see if the column in your Laravel application DB is unique or not. For example, the article table has slug and author_id with the unique slug for each author. See the code below, it’s useful for multi-tenancy: