public function index(Request $request)
 {
     if ($request->input('username')) {
         return redirect('users/' . $request->input('username'));
     }
     $this->view->title = 'Users';
     $this->view->breadcrumbs = ['users' => 'Users'];
     $this->view->email_queue_count = \App\Model\QueuedEmail::count();
     $this->view->roles = Role::orderBy('name', 'ASC')->get();
     $this->view->users = User::orderBy('name', 'ASC')->paginate(20);
     $start = new \DateTime('today');
     $end = new \DateTime('1 month');
     $this->view->dates = new \DatePeriod($start, new \DateInterval('P1D'), $end);
     $this->view->day_count = iterator_count($this->view->dates);
     return $this->view;
 }