validate(['post_id' => ['required', 'string']]); $post = Post::where('workspace_id', $request->user()->current_workspace_id) ->with(['postPlatforms.socialAccount', 'labels']) ->find(data_get($validated, 'post_id')); if (! $post) { return Response::error('Post not found.'); } return Response::structured((new PostResource($post))->resolve()); } public function schema(JsonSchema $schema): array { return [ 'post_id' => $schema->string()->required()->description('The post ID to retrieve.'), ]; } }