Created
October 23, 2020 06:01
-
-
Save andyyou/01a71a34fe99334c87edd685883f34d7 to your computer and use it in GitHub Desktop.
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
This file contains 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
use Illuminate\Database\Eloquent\SoftDeletes; | |
// ... | |
// If you want to support verify you can add implements | |
class User extends Authenticatable | |
{ | |
use Notifiable; | |
use SoftDeletes; | |
// ... | |
/** | |
* The attributes that should be cast to native types. | |
* | |
* @var array | |
*/ | |
protected $casts = [ | |
'email_verified_at' => 'datetime', | |
'social' => 'array', | |
]; | |
// (opt) Most of case you should keep email in lowercase | |
public function setEmailAttribute($value) | |
{ | |
$this->attributes['email'] = strtolower($value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment