Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function authenticate(Request $request) {
- $username = $request->input('post_username');
- $password = $request->input('post_password');
- dd(Auth::attempt(['username' => $username, 'password' => $password]));
- if (Auth::attempt(['username' => $username, 'password' => $password])) {
- // Authentication passed...
- return redirect()->intended('/admin');
- } else {
- $data = [
- 'error' => true,
- ];
- return view('admin.auth.login', $data);
- }
- }
- public function login() {
- return view('admin.auth.login');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement