This commit is contained in:
2025-05-11 03:45:17 +08:00
commit 3d7660a24c
70 changed files with 13635 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<?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);
}
}