Skip to content

Instantly share code, notes, and snippets.

@andyyou
Created October 23, 2020 06:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyyou/01a71a34fe99334c87edd685883f34d7 to your computer and use it in GitHub Desktop.
Save andyyou/01a71a34fe99334c87edd685883f34d7 to your computer and use it in GitHub Desktop.
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
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