daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $users =  User::byRole()->inCompany()
  2.         ->with([
  3.             'role'     => function ($q) use ($orderBy, $relationship, $asc) {
  4.  
  5.                 $q->select('id', 'title')->orderBy('title','DESC');
  6.             },
  7.             'company'  => function ($q) {
  8.                 $q->select('id', 'company_name');
  9.             },
  10.             'projects' => function ($q) {
  11.                 $q->select('id', 'name');
  12.             },
  13.         ])->select([
  14.             'email',
  15.             'id',
  16.             'company_id',
  17.         ])->paginate();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top