This commit is contained in:
mobin
2026-04-08 07:22:13 +00:00
parent 2adb741dac
commit a6b5f27343
30300 changed files with 134406 additions and 1504 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Webauth extends Model
{
// نام جدول
protected $table = 'webauth';
// فیلدهای قابل تخصیص انبوه
protected $fillable = [
'customer_id',
'name',
'credential_id',
'public_key',
'sign_count',
'transports',
'last_used_at',
];
// تبدیل نوع داده‌ها
protected $casts = [
'transports' => 'array', // فرض بر این است که transports به صورت JSON ذخیره می‌شود
'last_used_at' => 'datetime',
];
/**
* تعریف رابطه: این کلید متعلق به یک کاربر است.
*/
public function customer()
{
return $this->belongsTo(User::class);
}
}