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>
34 lines
689 B
PHP
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')),
|
|
]);
|
|
}
|
|
}
|
|
}
|