install
This commit is contained in:
3
stubs/filament/ColumnView.stub
Normal file
3
stubs/filament/ColumnView.stub
Normal file
@@ -0,0 +1,3 @@
|
||||
<div {{ $getExtraAttributeBag() }}>
|
||||
{{ $getState() }}
|
||||
</div>
|
||||
3
stubs/filament/ComponentView.stub
Normal file
3
stubs/filament/ComponentView.stub
Normal file
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{-- Use $getChildSchema() to render the child schema() of this component. --}}
|
||||
</div>
|
||||
8
stubs/filament/EntryView.stub
Normal file
8
stubs/filament/EntryView.stub
Normal file
@@ -0,0 +1,8 @@
|
||||
<x-dynamic-component
|
||||
:component="$getEntryWrapperView()"
|
||||
:entry="$entry"
|
||||
>
|
||||
<div {{ $getExtraAttributeBag() }}>
|
||||
{{ $getState() }}
|
||||
</div>
|
||||
</x-dynamic-component>
|
||||
11
stubs/filament/FieldView.stub
Normal file
11
stubs/filament/FieldView.stub
Normal file
@@ -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>
|
||||
11
stubs/filament/LivewireFormView.stub
Normal file
11
stubs/filament/LivewireFormView.stub
Normal file
@@ -0,0 +1,11 @@
|
||||
<div>
|
||||
<form wire:submit="{{ submitAction }}">
|
||||
{{ $this->form }}
|
||||
|
||||
<button type="submit">
|
||||
Submit
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<x-filament-actions::modals />
|
||||
</div>
|
||||
5
stubs/filament/LivewireSchemaView.stub
Normal file
5
stubs/filament/LivewireSchemaView.stub
Normal file
@@ -0,0 +1,5 @@
|
||||
<div>
|
||||
{{ $this->content }}
|
||||
|
||||
<x-filament-actions::modals />
|
||||
</div>
|
||||
3
stubs/filament/LivewireTableView.stub
Normal file
3
stubs/filament/LivewireTableView.stub
Normal file
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{ $this->table }}
|
||||
</div>
|
||||
3
stubs/filament/PageView.stub
Normal file
3
stubs/filament/PageView.stub
Normal file
@@ -0,0 +1,3 @@
|
||||
<x-filament-panels::page>
|
||||
{{-- Page content --}}
|
||||
</x-filament-panels::page>
|
||||
3
stubs/filament/RichContentCustomBlockPreviewView.stub
Normal file
3
stubs/filament/RichContentCustomBlockPreviewView.stub
Normal file
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{-- Custom block preview --}}
|
||||
</div>
|
||||
3
stubs/filament/RichContentCustomBlockView.stub
Normal file
3
stubs/filament/RichContentCustomBlockView.stub
Normal file
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
{{-- Custom block --}}
|
||||
</div>
|
||||
4
stubs/filament/ThemeCss.stub
Normal file
4
stubs/filament/ThemeCss.stub
Normal file
@@ -0,0 +1,4 @@
|
||||
@import '../../../../vendor/filament/filament/resources/css/theme.css';
|
||||
|
||||
@source '../../../../app/Filament/{{ classDirectory }}**/*';
|
||||
@source '../../../../resources/views/filament/{{ viewDirectory }}**/*';
|
||||
5
stubs/filament/WidgetView.stub
Normal file
5
stubs/filament/WidgetView.stub
Normal file
@@ -0,0 +1,5 @@
|
||||
<x-filament-widgets::widget>
|
||||
<x-filament::section>
|
||||
{{-- Widget content --}}
|
||||
</x-filament::section>
|
||||
</x-filament-widgets::widget>
|
||||
40
stubs/prompt.stub
Normal file
40
stubs/prompt.stub
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Prompt;
|
||||
use Laravel\Mcp\Server\Prompts\Argument;
|
||||
|
||||
class {{ class }} extends Prompt
|
||||
{
|
||||
/**
|
||||
* The prompt's description.
|
||||
*/
|
||||
protected string $description = <<<'MARKDOWN'
|
||||
A description of what this prompt does.
|
||||
MARKDOWN;
|
||||
|
||||
/**
|
||||
* 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, \Laravel\Mcp\Server\Prompts\Argument>
|
||||
*/
|
||||
public function arguments(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
27
stubs/resource.stub
Normal file
27
stubs/resource.stub
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Laravel\Mcp\Server\Resource;
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
|
||||
class {{ class }} extends Resource
|
||||
{
|
||||
/**
|
||||
* The resource's description.
|
||||
*/
|
||||
protected string $description = <<<'MARKDOWN'
|
||||
A description of what this resource contains.
|
||||
MARKDOWN;
|
||||
|
||||
/**
|
||||
* Handle the resource request.
|
||||
*/
|
||||
public function handle(Request $request): Response
|
||||
{
|
||||
//
|
||||
|
||||
return Response::text('The resource content.');
|
||||
}
|
||||
}
|
||||
52
stubs/server.stub
Normal file
52
stubs/server.stub
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Laravel\Mcp\Server;
|
||||
|
||||
class {{ class }} extends Server
|
||||
{
|
||||
/**
|
||||
* The MCP server's name.
|
||||
*/
|
||||
protected string $name = '{{ serverDisplayName }}';
|
||||
|
||||
/**
|
||||
* The MCP server's version.
|
||||
*/
|
||||
protected string $version = '0.0.1';
|
||||
|
||||
/**
|
||||
* The MCP server's instructions for the LLM.
|
||||
*/
|
||||
protected string $instructions = <<<'MARKDOWN'
|
||||
Instructions describing how to use the server and its features.
|
||||
MARKDOWN;
|
||||
|
||||
/**
|
||||
* The tools registered with this MCP server.
|
||||
*
|
||||
* @var array<int, class-string<\Laravel\Mcp\Server\Tool>>
|
||||
*/
|
||||
protected array $tools = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* The resources registered with this MCP server.
|
||||
*
|
||||
* @var array<int, class-string<\Laravel\Mcp\Server\Resource>>
|
||||
*/
|
||||
protected array $resources = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* The prompts registered with this MCP server.
|
||||
*
|
||||
* @var array<int, class-string<\Laravel\Mcp\Server\Prompt>>
|
||||
*/
|
||||
protected array $prompts = [
|
||||
//
|
||||
];
|
||||
}
|
||||
40
stubs/tool.stub
Normal file
40
stubs/tool.stub
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace {{ namespace }};
|
||||
|
||||
use Illuminate\JsonSchema\JsonSchema;
|
||||
use Laravel\Mcp\Request;
|
||||
use Laravel\Mcp\Response;
|
||||
use Laravel\Mcp\Server\Tool;
|
||||
|
||||
class {{ class }} extends Tool
|
||||
{
|
||||
/**
|
||||
* The tool's description.
|
||||
*/
|
||||
protected string $description = <<<'MARKDOWN'
|
||||
A description of what this tool does.
|
||||
MARKDOWN;
|
||||
|
||||
/**
|
||||
* 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, \Illuminate\JsonSchema\JsonSchema>
|
||||
*/
|
||||
public function schema(JsonSchema $schema): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user