Answers for "get user with role laravel"

PHP
1

get user with role laravel

$students = User::whereHas(
    'roles', function($q){
        $q->where('name', 'Teacher');
    }
)->get();
Posted by: Guest on November-23-2020

Browse Popular Code Answers by Language