feat: filament

This commit is contained in:
2026-07-09 14:23:25 +02:00
parent 462be44fa5
commit dc00141d25
61 changed files with 3153 additions and 11 deletions
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace App\Models;
use App\Enums\AccessRequestStatus;
use Illuminate\Database\Eloquent\Concerns\HasUlids;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class AccessRequests extends Model
{
use HasUlids;
public $incrementing = false;
protected $keyType = 'string';
protected $fillable = [
'game_username',
'message',
'server_id',
];
public function reviewedBy(): BelongsTo
{
return $this->belongsTo(User::class, 'reviewed_by');
}
public function server(): BelongsTo
{
return $this->belongsTo(GameServers::class, 'server_id');
}
protected function casts(): array
{
return [
'id' => 'string',
'reviewed_at' => 'timestamp',
'status' => AccessRequestStatus::class,
];
}
}
+7
View File
@@ -2,10 +2,17 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Concerns\HasUlids;
use Illuminate\Database\Eloquent\Model;
class GameServers extends Model
{
use HasUlids;
public $incrementing = false;
protected $keyType = 'string';
protected $fillable = [
'name',
'slug',
+7 -1
View File
@@ -3,9 +3,11 @@
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use App\Enums\UserRole;
use Database\Factories\UserFactory;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Hidden;
use Illuminate\Database\Eloquent\Concerns\HasUlids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
@@ -15,8 +17,11 @@ use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<UserFactory> */
use HasFactory, Notifiable;
use HasFactory, Notifiable, HasUlids;
public $incrementing = false;
protected $keyType = 'string';
/**
* Get the attributes that should be cast.
*
@@ -27,6 +32,7 @@ class User extends Authenticatable
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
'role' => UserRole::class,
];
}
}