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\Comment;
use Illuminate\Foundation\Http\FormRequest;
class StoreCommentRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, array<int, string>>
*/
public function rules(): array
{
return [
'commentable_type' => ['required', 'string', 'in:course,category,announcement'],
'commentable_id' => ['required', 'integer'],
'author_name' => ['required', 'string', 'max:255'],
'content' => ['required', 'string', 'max:1000'],
'rating' => ['nullable', 'integer', 'min:1', 'max:5'],
];
}
/**
* @return array<string, string>
*/
public function messages(): array
{
return [
'commentable_type.required' => 'Yorum tipi zorunludur.',
'commentable_type.in' => 'Geçersiz yorum tipi.',
'commentable_id.required' => 'Yorum hedefi zorunludur.',
'author_name.required' => 'İsim zorunludur.',
'content.required' => 'Yorum içeriği zorunludur.',
'content.max' => 'Yorum en fazla 1000 karakter olabilir.',
'rating.min' => 'Puan en az 1 olabilir.',
'rating.max' => 'Puan en fazla 5 olabilir.',
];
}
}

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Http\Requests\Comment;
use Illuminate\Foundation\Http\FormRequest;
class UpdateCommentRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, array<int, string>>
*/
public function rules(): array
{
return [
'is_approved' => ['sometimes', 'boolean'],
'admin_reply' => ['nullable', 'string', 'max:1000'],
];
}
/**
* @return array<string, string>
*/
public function messages(): array
{
return [
'admin_reply.max' => 'Admin yanıtı en fazla 1000 karakter olabilir.',
];
}
}