Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class SocialAccount extends Model
{
protected $table = 'social_accounts';
protected $fillable = [
'user_id',
'provider',
'provider_id',
'avatar',
];
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
public static function findByProvider(string $provider, string $providerId): ?self
{
return static::where('provider', $provider)
->where('provider_id', $providerId)
->first();
}
}