You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/app/Models/AccountInterstitial.php

34 lines
685 B
PHTML

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class AccountInterstitial extends Model
{
9 months ago
public const JSON_MESSAGE = 'Please use web browser to proceed.';
7 months ago
protected function casts(): array
{
return [
'read_at' => 'datetime',
'appeal_requested_at' => 'datetime',
];
}
public function user(): BelongsTo
9 months ago
{
return $this->belongsTo(User::class);
}
9 months ago
public function status()
{
if ($this->item_type != Status::class) {
9 months ago
return;
}
return $this->hasOne(Status::class, 'id', 'item_id');
}
}