first commit

This commit is contained in:
Ariyutta
2026-08-07 10:47:09 +07:00
commit 1c094fbe7f
11630 changed files with 1580900 additions and 0 deletions
@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
namespace Laravel\Mcp\Console\Commands;
use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;
#[AsCommand(
name: 'make:mcp-resource',
description: 'Create a new MCP resource class'
)]
class MakeResourceCommand extends GeneratorCommand
{
/**
* @var string
*/
protected $type = 'Resource';
protected function getStub(): string
{
return file_exists($customPath = $this->laravel->basePath('stubs/mcp-resource.stub'))
? $customPath
: __DIR__.'/../../../stubs/mcp-resource.stub';
}
protected function getDefaultNamespace($rootNamespace): string
{
return "{$rootNamespace}\\Mcp\\Resources";
}
/**
* @return array<int, array<int, string|int>>
*/
protected function getOptions(): array
{
return [
['force', 'f', InputOption::VALUE_NONE, 'Create the class even if the resource already exists'],
];
}
}