A
A
Alex Oreshko2019-03-22 18:34:34
Laravel
Alex Oreshko, 2019-03-22 18:34:34

How to change the name of the standard field name and password?

Hello. The question arose, how to change the standard password, for example, to user_password?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Panteleev, 2019-03-25
@AlexIopi

Override in LoginController( Documentation )

public function username()
    {
        return 'phone';
    }

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question