1
Good evening, I would like to know how to use the auth of Laravel but with a different table, I saw some articles on the internet but could not change yet.
I tried to overwrite the protected method $table = 'table_name'; But unsuccessfully, he did not authenticate there, someone could help me?
Model of access to the bank:
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
protected $table = 'autenticar';
protected $fillable = [
'email', 'password_hash',
];
protected $username = 'email';
protected $email = 'email';
protected $password = 'password_hash';
// protected $hidden = [
// 'password', 'remember_token',
// ];
// protected $casts = [
// 'email_verified_at' => 'datetime',
// ];
}
why change table name? and which fields exist in this table? because that protected ai
$username
,$email
????– novic