I want to use function attempt for login authenticate but i don't want send variable password
* If i run code this it will show error "Undefined index: password" and this below
vendor\laravel\framework\src\Illuminate\Auth\EloquentUserProvider.php
public function validateCredentials(UserInterface $user, array $credentials)
{
$plain = $credentials['password'];
return $this->hasher->check($plain, $user->getAuthPassword());
How can i do that . pls thank you
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class Users extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait;
protected $table = 'users';
protected $hidden = array('email','remember_token');
$users_data = array(
'email' => 'test@example.com',
);
if(Auth::users()->attempt($users_data,true)){
echo 'SUCCESS';
}
}