How to use username to login instead of email in laravel 5.3?

I read the documentation but did not understand it https://laravel.com/docs/5.3/authentication#included-authenticating

    1 answer 1

    Add to

    App \ Http \ Controllers \ Auth \ LoginController.php

    This code:

    public function username() { return 'name';//строка name в таблице users }