Esempio n. 1
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 public function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Esempio n. 2
0
 public function deleteuser($username)
 {
     $user = User::whereUsername($username)->firstOrFail();
     $user->delete();
     return redirect()->route('admin-user')->with('message', 'User telah dihapus...');
 }
 public function user()
 {
     $users = User::with('roles')->oldest()->paginate(5);
     return view('admin.user', compact('users'));
 }