Guest User

Untitled

a guest
Jul 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. //laravel 5.5 below
  2.  
  3. $roles = $this->role->whereRaw('JSON_CONTAINS(role_group, \'["MSC_POSTAPP"]\' )')->get();
  4.  
  5. //laravel 5.6
  6.  
  7. $roles = $this->role->whereJsonContains('role_group', 'MSC_POSTAPP')->get();
Add Comment
Please, Sign In to add comment