updates for admin area

This commit is contained in:
Mark Gregory
2026-09-12 21:18:19 +01:00
parent ab3134de13
commit 5e2f4a1fa7
42 changed files with 894 additions and 210 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Message extends Model
{
protected $fillable = ['from_user_id', 'to_user_id', 'subject', 'body', 'status', 'read_at'];
protected function casts(): array
{
return ['read_at' => 'datetime'];
}
public function fromUser()
{
return $this->belongsTo(User::class, 'from_user_id');
}
public function toUser()
{
return $this->belongsTo(User::class, 'to_user_id');
}
}