Initial commit
This commit is contained in:
commit
9d73f82529
5575 files changed
+281989
No files matched your search
Executable
+17
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Rules;
|
||||
|
||||
use App\Models\Miscellaneous\WebsiteInstallation;
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
|
||||
class ValidateInstallationKeyRule implements ValidationRule
|
||||
{
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
if ($value !== WebsiteInstallation::first()->installation_key) {
|
||||
$fail('The :attribute does not match');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user