updates
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<div {{ $getExtraAttributeBag() }}>
|
||||
{{ $getState() }}
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{-- Use $getChildSchema() to render the child schema() of this component. --}}
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<x-dynamic-component
|
||||
:component="$getEntryWrapperView()"
|
||||
:entry="$entry"
|
||||
>
|
||||
<div {{ $getExtraAttributeBag() }}>
|
||||
{{ $getState() }}
|
||||
</div>
|
||||
</x-dynamic-component>
|
||||
@@ -0,0 +1,11 @@
|
||||
<x-dynamic-component
|
||||
:component="$getFieldWrapperView()"
|
||||
:field="$field"
|
||||
>
|
||||
<div
|
||||
x-data="{ state: $wire.$entangle(@js($getStatePath())) }"
|
||||
{{ $getExtraAttributeBag() }}
|
||||
>
|
||||
{{-- Interact with the `state` property in Alpine.js --}}
|
||||
</div>
|
||||
</x-dynamic-component>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div>
|
||||
<form wire:submit="{{ submitAction }}">
|
||||
{{ $this->form }}
|
||||
|
||||
<button type="submit">
|
||||
Submit
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<x-filament-actions::modals />
|
||||
</div>
|
||||
@@ -0,0 +1,5 @@
|
||||
<div>
|
||||
{{ $this->content }}
|
||||
|
||||
<x-filament-actions::modals />
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{ $this->table }}
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<x-filament-panels::page>
|
||||
{{-- Page content --}}
|
||||
</x-filament-panels::page>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{-- Custom block preview --}}
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{-- Custom block --}}
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
@import '../../../../vendor/filament/filament/resources/css/theme.css';
|
||||
|
||||
@source '../../../../app/Filament/{{ classDirectory }}**/*';
|
||||
@source '../../../../resources/views/filament/{{ viewDirectory }}**/*';
|
||||
@@ -0,0 +1,5 @@
|
||||
<x-filament-widgets::widget>
|
||||
<x-filament::section>
|
||||
{{-- Widget content --}}
|
||||
</x-filament::section>
|
||||
</x-filament-widgets::widget>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Attributes\AppMeta;
|
||||
use Laravel\Mcp\Server\Attributes\Description;
|
||||
use Laravel\Mcp\Server\AppResource;
|
||||
|
||||
#[Description('A description of what this app resource does.')]
|
||||
#[AppMeta]
|
||||
class {{ class }} extends AppResource
|
||||
{
|
||||
/**
|
||||
* Handle the app resource request.
|
||||
*/
|
||||
public function handle(Request $request): Response
|
||||
{
|
||||
return Response::view('{{ view }}', [
|
||||
'title' => $this->title(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<x-mcp::app :title="$title">
|
||||
<x-slot:head>
|
||||
<script type="module">
|
||||
createMcpApp(async (app) => {
|
||||
document.getElementById('run-btn').addEventListener('click', async () => {
|
||||
const result = await app.callServerTool('tool-name', {});
|
||||
document.getElementById('output').textContent = result.content[0]?.text ?? '';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</x-slot:head>
|
||||
|
||||
<div id="app">
|
||||
<button id="run-btn">Run</button>
|
||||
<p id="output"></p>
|
||||
</div>
|
||||
</x-mcp::app>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Attributes\Description;
|
||||
use Laravel\Mcp\Server\Prompt;
|
||||
use Laravel\Mcp\Server\Prompts\Argument;
|
||||
|
||||
#[Description('A description of what this prompt does.')]
|
||||
class {{ class }} extends Prompt
|
||||
{
|
||||
/**
|
||||
* Handle the prompt request.
|
||||
*/
|
||||
public function handle(Request $request): Response
|
||||
{
|
||||
//
|
||||
|
||||
return Response::text('The content generated by the prompt.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the prompt's arguments.
|
||||
*
|
||||
* @return array<int, Argument>
|
||||
*/
|
||||
public function arguments(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Attributes\Description;
|
||||
use Laravel\Mcp\Server\Resource;
|
||||
|
||||
#[Description('A description of what this resource contains.')]
|
||||
class {{ class }} extends Resource
|
||||
{
|
||||
/**
|
||||
* Handle the resource request.
|
||||
*/
|
||||
public function handle(Request $request): Response
|
||||
{
|
||||
//
|
||||
|
||||
return Response::text('The resource content.');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Laravel\Mcp\Server;
|
||||
use Laravel\Mcp\Server\Attributes\Instructions;
|
||||
use Laravel\Mcp\Server\Attributes\Name;
|
||||
use Laravel\Mcp\Server\Attributes\Version;
|
||||
|
||||
#[Name('{{ serverDisplayName }}')]
|
||||
#[Version('0.0.1')]
|
||||
#[Instructions('Instructions describing how to use the server and its features.')]
|
||||
class {{ class }} extends Server
|
||||
{
|
||||
protected array $tools = [
|
||||
//
|
||||
];
|
||||
|
||||
protected array $resources = [
|
||||
//
|
||||
];
|
||||
|
||||
protected array $prompts = [
|
||||
//
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Illuminate\Contracts\JsonSchema\JsonSchema;
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Attributes\Description;
|
||||
use Laravel\Mcp\Server\Tool;
|
||||
|
||||
#[Description('A description of what this tool does.')]
|
||||
class {{ class }} extends Tool
|
||||
{
|
||||
/**
|
||||
* Handle the tool request.
|
||||
*/
|
||||
public function handle(Request $request): Response
|
||||
{
|
||||
//
|
||||
|
||||
return Response::text('The content generated by the tool.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tool's input schema.
|
||||
*
|
||||
* @return array<string, JsonSchema>
|
||||
*/
|
||||
public function schema(JsonSchema $schema): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user