Created
September 16, 2019 17:22
-
-
Save MaheKarim/13bc5329e1a0c7be166baab2c2898be1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Notifications\Notifiable; | |
use Illuminate\Contracts\Auth\MustVerifyEmail; | |
use Illuminate\Foundation\Auth\User as Authenticatable; | |
use Illuminate\Support\Facades\Hash; | |
class User extends Authenticatable implements MustVerifyEmail | |
{ | |
use Notifiable; | |
protected $fillable = [ | |
'name', 'email', 'password', 'phn_number', 'user_role', | |
]; | |
protected $hidden = [ | |
'password', 'remember_token', | |
]; | |
protected $casts = [ | |
'email_verified_at' => 'datetime', | |
]; | |
public function setPasswordAttribute($password) | |
{ | |
$this->attributes['password'] = bcrypt($password); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment