chore: 📦 bump in laravel 11 + robots.txt

This commit is contained in:
Karl Muller 2025-03-07 10:28:17 +00:00
parent 25f31ff7b2
commit a8605236a7
5 changed files with 1172 additions and 1207 deletions

View file

@ -2,9 +2,9 @@
namespace App\Http\Requests\Bo\Labels;
use App\Rules\Hex;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
use LVR\Colour\Hex;
class StoreLabelRequest extends FormRequest
{

76
app/Rules/Hex.php Normal file
View file

@ -0,0 +1,76 @@
<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\ValidationRule;
class Hex implements ValidationRule
{
/**
* @var boolean
*/
protected $forceFull;
/**
* @var boolean
*/
protected $allowAlpha;
/**
* __construct method
*
* @param boolean $forceFull
* @param boolean $allowAlpha
*
* @return void
*/
public function __construct(bool $forceFull = false, bool $allowAlpha = false)
{
$this->forceFull = $forceFull;
$this->allowAlpha = $allowAlpha;
}
/**
* Run the validation rule.
*
* @param string $attribute
* @param mixed $value
* @param \Closure(string):\Illuminate\Translation\PotentiallyTranslatedString $fail
* @return void
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed
* @phpcs:disable Squiz.Commenting.FunctionComment.IncorrectTypeHint
*/
public function validate(string $attribute, mixed $value, \Closure $fail): void
{
$pattern = '/^#([a-fA-F0-9]{6}';
if (!$this->forceFull) {
$pattern .= '|[a-fA-F0-9]{3}';
}
if ($this->allowAlpha) {
$pattern .= '|[a-fA-F0-9]{8}';
if (!$this->forceFull) {
$pattern .= '|[a-fA-F0-9]{4}';
}
}
$pattern .= ')$/';
if (!(bool)preg_match($pattern, $value)) {
$fail(trans($this->message()));
}
}
/**
* Get the validation error message.
*
* @return string
*/
public function message(): string
{
return 'The hex code is not valid';
}
}

View file

@ -12,30 +12,28 @@
],
"license": "MIT",
"require": {
"php": "^8.2",
"php": "^8.3",
"carlos-meneses/laravel-mpdf": "^2.1",
"codegreencreative/laravel-samlidp": "^5.2",
"diglactic/laravel-breadcrumbs": "^8.0",
"diglactic/laravel-breadcrumbs": "^9.0",
"doctrine/dbal": "^3.1",
"graham-campbell/gitlab": "^7.0",
"guzzlehttp/guzzle": "^7.2",
"laravel-validation-rules/colour": "^1.6",
"laravel/framework": "^10.0",
"laravel/framework": "^11.0",
"laravel/tinker": "^2.8",
"laravel/ui": "^4.2",
"ldc/web-admin-secure-laravel": "^2.0",
"mews/purifier": "^3.4",
"sentry/sentry-laravel": "*",
"uwil/admin-secure-laravel": "^3.0",
"uwil/k8s-laravel": "^1.2"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"kitloong/laravel-migrations-generator": "^6.8",
"laravel-lang/common": "^4.0",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^10.0",
"slevomat/coding-standard": "^8.10",
"spatie/laravel-ignition": "^2.0",

2280
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,11 @@
User-agent: *
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: Amazonbot
Disallow: /
User-agent: ClaudeBot
Disallow: /