What I am trying to do is at registration I need check 2 tables for the 'slug' for the user so obviously it has to be unique to the user table, and I have a restrictions table so user can also user banned words, offensive and general stuff like that.
// check that the slug does not exist in the profiles table
$valid = !DB::table('profiles')->where('slug', $value['value'])->select([$same])->first();
// check that the slug does not exist in the restrictions table
if($valid) {
$valid = !DB::table('restrictions')->where('slug', $value['value'])->select([$same])->first();
}
dd($valid);
If it exists in the profiles table, it wont query the restrictions table.
If it does nto exist in the profiles table, it will query the restrictions table to see if it is still valid.