public function testStore() { $user = factory(User::class)->make(); $input = array_only($user->getAttributes(), $user->getFillable()); $this->action('POST', 'Admin\\UsersController@store', $input); $this->assertRedirectedToRoute('admin.users.show', User::latest()->first()); }
/** * GET /admin/users * Display all of the users. * * @return \Illuminate\View\View */ public function index() { $users = User::latest()->paginate(25); return view('admin.users.index', compact('users'))->withTitle('All users'); }