/** * @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); }
/** * Creates a new message thread. * * @return mixed */ public function create() { $users = User::where('id', '!=', Auth::id())->get(); return view('messenger.create', compact('users')); }