Last active
July 29, 2018 18:24
-
-
Save ho3ein-mola/348b292eb7cb7a6e3c0cf313f29e5985 to your computer and use it in GitHub Desktop.
get user base on rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$users = User::whereHas('roles', function ($query) { | |
$query->where('id', 2); | |
})->get(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment