示例#1
0
 /**
  * @testdox Requesting a password reminder adds an item to the Mail Queue.
  * @test
  */
 public function emailReminder()
 {
     $user = new User(['username' => 'test']);
     $user->save();
     $user->sendPasswordReminder();
     $this->assertEquals(1, QueuedEmail::count());
 }
 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;
 }