mardi 13 février 2018

Laravel Accessors not working

Good Day .. Ive been working in user module and want my password to automatically hash in save, but it doesn't work.

Here's my code ..

public function setPasswordAttribute($value){

    dd($value);
    $this->attributes['password'] = Hash::make($value);

}

My model extends Authenticatable. Whats the problem with this ? thanks in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire