I'm using Auth::login($user);
to log in manually
using fluent / querybuilder
Example
$count = DB::table('users')
->where('username', '=', $username)
->where('password', '=', $password)
->count();
if($count > 0 ){
$user = DB::table('users')
->where('login', '=', $username)
->where('password', '=', $password)
->get();
Auth::login($user);
return redirect("/");
}else{
return "datos incorrectos";
}
what laravel says:
Type error: Argument 1 passed to Illuminate \ Auth \ Guard :: login () must be an instance of Illuminate \ Contracts \ Auth \ Authenticatable, array given
Is there any way to make it work?