Files
CFDivePlatform/app/Models/SocialAccount.php
T
2025-05-11 03:45:17 +08:00

45 lines
824 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class SocialAccount extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'user_id',
'provider',
'provider_id',
'provider_email',
'access_token',
'refresh_token',
'expires_in',
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'access_token',
'refresh_token',
];
/**
* 取得此社交帳號的使用者
*/
public function user()
{
return $this->belongsTo(User::class);
}
}