2
People changed the name of the standard model of Laravel User.php
for Colaboradores.php
(of course, I set the $table
and the $primaryKey
model), I also changed the config/auth.php
to model
. but login is always returning me false
, follow login code:
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => Siga\Colaboradores::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
public function auth( Request $request )
{
$username = $request->input("usuario_colaborador");
$password = $request->input("senha_colaborador");
if( Auth::check() || Auth::attempt([
'usuario_colaborador' => $username,
'senha_colaborador' => $password]) )
{
// redirecionando usuário depois de logado
return redirect(route('farol.meufarol'));
}
else
return redirect(route('login'));
}
Shit, ball show, thanks Virgilio!!
– Carlos Eduardo Silva