2023-08-22 00:15:35 +06:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2023-12-05 21:48:02 +06:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
2023-09-19 14:27:33 +06:00
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
2023-08-22 00:15:35 +06:00
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
final class CaptchaToken extends Model
|
|
|
|
{
|
|
|
|
use HasFactory, SoftDeletes;
|
|
|
|
|
|
|
|
protected $table = 'captcha_tokens';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that are mass assignable.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $fillable = [
|
|
|
|
'title',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The attributes that should be hidden for serialization.
|
|
|
|
*
|
|
|
|
* @var array<int, string>
|
|
|
|
*/
|
|
|
|
protected $hidden = [
|
|
|
|
'public_token',
|
|
|
|
'private_token',
|
|
|
|
];
|
2023-09-19 14:27:33 +06:00
|
|
|
|
|
|
|
public function captchas(): HasMany
|
|
|
|
{
|
|
|
|
return $this->hasMany(Captcha::class);
|
|
|
|
}
|
2023-12-05 21:48:02 +06:00
|
|
|
|
|
|
|
public function user(): BelongsTo
|
|
|
|
{
|
|
|
|
return $this->belongsTo(User::class);
|
|
|
|
}
|
2023-08-22 00:15:35 +06:00
|
|
|
}
|