You could try
$exists = DB::table('roles')->where('name', 'Moderator')->first();
if(!$exists)
// not there
If only need to know if that record exists you could do a count as well .
Yea you want to be looking at a different part of the API. Your not actually directly dealing with any connection.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community