mardi 6 mars 2018

Laravel 5 not generating api token on register

I have added a column for api_token and in my register controller , while creating the user I am trying to generate a unique id , but its not generating any code . Here is my create user function in register controller

protected function create(array $data)
{
    return User::create([
        'name' => $data['name'],
        'email' => $data['email'],
        'api_token' => md5($data['email'].$data['name']),
        'password' => bcrypt($data['password']),
    ]);
}

Do I need to add this somewhere else?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2D4lh31
via IFTTT

Aucun commentaire:

Enregistrer un commentaire