예제 #1
0
 /**
  * @return array
  */
 protected function getUserOptionsForSelect()
 {
     $users = User::where('id', '<>', \Auth::id())->orderBy('username')->lists('username', 'id')->toArray();
     $defaultUsers = [\Auth::id() => 'Myself', 'any' => 'Any staff member', '' => '---------------------'];
     $typeOptions = ['General' => 'General', 'Contact' => 'Contact', 'Billing' => 'Billing'];
     $userOptions = $defaultUsers + $users;
     return array($typeOptions, $userOptions);
 }
예제 #2
0
 /**
  * Creates a new message thread.
  *
  * @return mixed
  */
 public function create()
 {
     $users = User::where('id', '!=', Auth::id())->get();
     return view('messenger.create', compact('users'));
 }