Question: I'm currently using Laravel 5.5, as you know Laravel by default offers authentication by email, but in my case I want to change its behaviour and allow the user to login using the mobile number. so Where would I have to do the modifications?

Answer: 
From [the docs](https://laravel.com/docs/5.5/authentication#included-authenticating):

> 
> By default, Laravel uses the email field for authentication. If you would like to customize this, you may define a username method on your `LoginController`:
> 
> 
> 

```
public function username()
{
    return 'mobile_number';
}

```

<https://laravel.com/docs/5.5/authentication#included-authenticating>
LoginController

```
public function username()
{
    return 'mobile';
}

```

also can validate

```
protected function validateLogin(Request $request)
{
    $this->validate($request, [
        $this->username() => 'required|string',
        'password' => 'required|string',
    ]);
}

```