Use php artisan make:auth and then :
To change the default table from users which uses the User model you have to navigate to : config/auth.php
And make these changes
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\UsersTable::class, //put the right model name here or you can use database driver
],
],
To change the table for an eloquent model you can do this
use Illuminate\Database\Eloquent\Model;
class UsersTable extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'UsersTable';
}
To change the default login credential from email to user name , just add this to the Authcontroller generated by laravel
class AuthController extends Controller
{
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
protected $redirectTo = '/home';
protected $username = 'username'; // you can put whatever column you want here from your table
Dont forget to change the validation stuff
EDIT
dont forget to add the username to the model like so
protected $fillable = [
'name', 'username', 'email', 'password',
];