first commit

This commit is contained in:
Doar Mihai
2026-08-08 18:03:29 +03:00
commit df2128ebff
183 changed files with 18719 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class UpdateToolRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'name' => ['sometimes', 'required', 'string', 'max:255'],
'slug' => ['sometimes', 'required', 'string', 'max:255', Rule::unique('tools', 'slug')->ignore($this->route('tool'))],
'description' => ['sometimes', 'required', 'string'],
'url' => ['sometimes', 'required', 'url', 'max:255'],
'logo_url' => ['nullable', 'url', 'max:255'],
'category' => ['sometimes', 'required', Rule::in(array_keys(config('tools.categories')))],
'subcategory' => ['nullable', 'string', 'max:255'],
'tags' => ['sometimes', 'array'],
'tags.*' => ['string', 'max:50'],
'pricing' => ['nullable', 'string', 'max:255'],
'features' => ['sometimes', 'array'],
'features.*' => ['string', 'max:255'],
'featured' => ['sometimes', 'boolean'],
'approved' => ['sometimes', 'boolean'],
];
}
}