V
V
Vlad Saenko2020-10-13 14:28:22
Laravel
Vlad Saenko, 2020-10-13 14:28:22

How to use validation on an array element?

function($name, $email, $password) {
            ($user = new User)->forceFill([
                'name' => $name,
                'email' => $email,
                'password' => Hash::make($password),
                'email_verified' => '1',
            ])->save();
                $user->setRolesById([1]);
        });

creating a user, you need to hang up validation on email.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2020-10-13
@FanatPHP

What am I doing wrong?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question