trypost/app/Http/Requests/App/Ai/RegeneratePostMediaImageRequest.php
Paulo Castellano 560393db2a feat: regenerate AI post images with brand palette in editor
Let users adjust AI-generated slides in place via async job and Echo, while applying workspace brand, background, and text colors to image prompts. Autofill swaps site text/background colors for the image palette, and regeneration is blocked on finalized posts with safer job cleanup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 16:27:55 -03:00

34 lines
689 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\App\Ai;
use Illuminate\Foundation\Http\FormRequest;
class RegeneratePostMediaImageRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
/**
* @return array<string, array<int, mixed>>
*/
public function rules(): array
{
return [
'instruction' => ['required', 'string', 'max:1000'],
];
}
protected function prepareForValidation(): void
{
if ($this->has('instruction')) {
$this->merge([
'instruction' => trim((string) $this->input('instruction')),
]);
}
}
}