| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
| class SocialPlatformCredential extends Model | |
| { | |
| use HasFactory; | |
| protected $fillable = [ | |
| 'user_id', | |
| 'platform', | |
| 'account_label', | |
| 'account_id', | |
| 'access_token', | |
| 'meta', | |
| ]; | |
| protected $casts = [ | |
| 'meta' => 'array', | |
| ]; | |
| protected $hidden = [ | |
| 'access_token', | |
| ]; | |
| public function user(): BelongsTo | |
| { | |
| return $this->belongsTo(User::class); | |
| } | |
| } | |