Files
muninn/app/Http/Resources/SiteResource.php
T
m105andClaude Sonnet 5 b3b250aaca Add free-text api_instructions field to Sites
For custom sites we'll post to via their own API — there's no wired-in
publisher for these, so this is where the site owner documents how to
actually post there (auth, endpoints, payload shape). Shown in the UI
for non-WordPress sites, exposed via the JSON API, and pointed to from
AI_API.md's "any other network/CMS" fallback section so an agent checks
it before improvising.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 14:03:43 +03:00

26 lines
704 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class SiteResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'name' => $this->name,
'url' => $this->url,
'description' => $this->description,
'cms_type' => $this->cms_type,
'wp_username' => $this->wp_username,
'wp_app_password' => $this->wp_app_password,
'api_instructions' => $this->api_instructions,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}