26 lines
476 B
PHP
26 lines
476 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ChatMessage extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $guarded = [];
|
|
|
|
protected $dateFormat = 'Y-m-d H:i:s.v';
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['created_at' => 'immutable_datetime'];
|
|
}
|
|
|
|
public function player(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Player::class);
|
|
}
|
|
}
|