Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Last active May 19, 2018 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/f35ff3dd1e512bebf7d74fd6ab4de18f to your computer and use it in GitHub Desktop.
Save uno-de-piera/f35ff3dd1e512bebf7d74fd6ab4de18f to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest')->except('logout');
}
/**
* Get the login username to be used by the controller.
*
* @return string
*/
public function username()
{
return 'name'; //ahora utilizaremos la columna name de la tabla users
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment