Club System

This commit is contained in:
2026-06-02 20:54:10 +02:00
parent c68c4d18b5
commit 0b18d289ef
38 changed files with 1464 additions and 118 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace App\Rules;
use Closure;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use Illuminate\Translation\PotentiallyTranslatedString;
class XfUserExists implements ValidationRule
{
/**
* Run the validation rule.
*
* @param Closure(string, ?string=): PotentiallyTranslatedString $fail
*/
public function validate(string $attribute, mixed $value, Closure $fail): void
{
$user = DB::connection('xenforo')->table('user')->where('user_id', $value)->first();
if( !$user ){
$fail("The user ID {$value} does not exist.");
}
}
}