Baseline snapshot of custom AI implementation before Laravel AI SDK migration. Includes: - Custom services: GeminiTextGenerationService, TextGenerationService (OpenAI), ImageGenerationService, AudioGenerationService, VideoGenerationService - IntentDetector for content moderation via keyword matching - AI enums: Intent, Orientation, UsageType - Blade prompt templates: system.blade.php, image.blade.php, video.blade.php - AiMessage with content_html accessor (markdown rendering) - AiUsageLog for monthly quota tracking per account - PostAssistantController with regex-based [GENERATE_*] parsing - WritingAssistantTab with markdown rendering, add-to-post, attachments - Workspace brand fields (name, description, tone, voice_notes) in system prompt - Session state block injected into prompts (thread counts, quota remaining) - AttachmentCollector pattern will replace the regex approach in Phase 2 - Post comments with replies, emoji reactions, real-time via Echo - Assets page with Unsplash + Giphy integrations
24 lines
594 B
PHP
24 lines
594 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Requests\App\Asset;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class StoreAssetFromUrlRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'url' => ['required', 'url', 'regex:/^https:\/\/(images\.unsplash\.com|media[0-9]*\.giphy\.com)\//'],
|
|
'filename' => ['required', 'string', 'max:255'],
|
|
'download_location' => ['nullable', 'url', 'regex:/^https:\/\/api\.unsplash\.com\//'],
|
|
];
|
|
}
|
|
}
|