update deploy

This commit is contained in:
bulut
2026-03-27 10:41:54 +03:00
parent 69d19c0176
commit 6f6448aa06
422 changed files with 37956 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<?php
namespace App\Http\Requests\Page;
use Illuminate\Foundation\Http\FormRequest;
class StorePageRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, array<int, string>>
*/
public function rules(): array
{
return [
'slug' => ['required', 'string', 'max:255', 'unique:pages,slug'],
'title' => ['required', 'string', 'max:255'],
'content' => ['nullable', 'string'],
'meta_title' => ['nullable', 'string', 'max:255'],
'meta_description' => ['nullable', 'string', 'max:255'],
'is_active' => ['sometimes', 'boolean'],
'blocks' => ['sometimes', 'array'],
'blocks.*.type' => ['required_with:blocks', 'string', 'max:50'],
'blocks.*.content' => ['required_with:blocks', 'array'],
'blocks.*.order_index' => ['sometimes', 'integer', 'min:0'],
];
}
/**
* @return array<string, string>
*/
public function messages(): array
{
return [
'slug.required' => 'URL slug alanı zorunludur.',
'slug.unique' => 'Bu slug zaten kullanılıyor.',
'title.required' => 'Başlık zorunludur.',
];
}
}

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Http\Requests\Page;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class UpdatePageRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, array<int, mixed>>
*/
public function rules(): array
{
return [
'slug' => ['sometimes', 'string', 'max:255', Rule::unique('pages', 'slug')->ignore($this->route('page'))],
'title' => ['sometimes', 'string', 'max:255'],
'content' => ['nullable', 'string'],
'meta_title' => ['nullable', 'string', 'max:255'],
'meta_description' => ['nullable', 'string', 'max:255'],
'is_active' => ['sometimes', 'boolean'],
'blocks' => ['sometimes', 'array'],
'blocks.*.type' => ['required_with:blocks', 'string', 'max:50'],
'blocks.*.content' => ['required_with:blocks', 'array'],
'blocks.*.order_index' => ['sometimes', 'integer', 'min:0'],
];
}
/**
* @return array<string, string>
*/
public function messages(): array
{
return [
'slug.unique' => 'Bu slug zaten kullanılıyor.',
];
}
}