public function getIndex(Request $request) { User::createTable(); // User::createAdmin('*****@*****.**','adminadmin123'); Img::createTable(); Mylog::createTable(); Banner::createTable(); Product::createTable(); }
public function postPassword(PasswordPRequest $request) { $user = $request->user(); if (Hash::check(WEBSITE_SECRET . $request->input('password'), $user->user_password)) { $result = $user->update(['user_password' => Hash::make(WEBSITE_SECRET . $request->input('password_new'))]); Mylog::cc($request, $user, 'user:password_update'); if ($result) { $res = redirect('/my/password')->with('msgSuccess', '密码修改成功'); } else { $res = redirect()->back()->withInput()->with('msgError', '数据库出错啦'); } } else { $res = redirect()->back()->withInput()->with('msgError', '原密码不正确哦'); } return $res; }
public function getIndex(Request $request) { User::createTable(); // User::createAdmin('*****@*****.**','admin'); Img::createTable(); Mylog::createTable(); Email::createTable(); Banner::createTable(); Activity::createTable(); Form::createTable(); Field::createTable(); FieldChildren::createTable(); Result::createTable(); ResultRow::createTable(); Charge::createTable(); }
public function getConfirm(Request $request, $user_email, $email_id, $code) { $user = User::where('user_email', '=', base64_decode($user_email))->where('user_active', 0)->firstOrFail(); $email = $user->Email('r')->where('email_block', 'user_confirm')->where('email_is_sent', '1')->where('email_status', '0')->where('email_datas', $code)->firstOrFail(); $user->update(['user_active' => 1]); $email->update(['email_status' => 1]); Mylog::cc($request, $user, 'user:confirm'); $res = redirect('/login')->with('msgSuccess', '账号激活成功,请登录。'); return $res; }
public function getIndex(Request $request) { $perpage = 20; $mylogs = Mylog::orderBy('created_at', 'DESC')->paginate($perpage); return view('manage.security.index', ['TITLE' => '安全中心', 'META_KEYWORDS' => META_KEYWORDS, 'META_DESC' => META_DESC, 'PAGE_CODE' => '', 'mylogs' => $mylogs]); }
public function getLogout(Request $request) { Mylog::cc($request, $request->user(), 'logout'); Auth::logout(); return redirect(DEFAULT_GUEST_REDIRECT_URL); }