Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Http\Controllers;
  4.  
  5. use Illuminate\Support\Facades\Auth;
  6.  
  7. class LoginEmailController extends Controller
  8. {
  9.     public function authenticate()
  10.     {
  11.         if (Auth::attempt(['email' => $email, 'password' => $password])) {
  12.             // sukses
  13.             return redirect()->intended('dashboard');
  14.         }
  15.  
  16.         // gagal
  17.         return redirect()->back();
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement