Skip to content

Commit

Permalink
Add Statamic Builder blueprint and fieldset commands
Browse files Browse the repository at this point in the history
  • Loading branch information
tdwesten committed Feb 11, 2024
1 parent dbf2513 commit 9300768
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "tdwesten/statamic-builder",
"description": "A fluent blueprint and fieldset builder for Statamic.",
"autoload": {
"psr-4": {
"Tdwesten\\StatamicBuilder\\": "src"
Expand Down Expand Up @@ -43,4 +44,4 @@
"pixelfear/composer-dist-plugin": true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Console\GeneratorCommand as BaseGeneratorCommand;

class MakeBlueprint extends BaseGeneratorCommand
class MakeBlueprintCommand extends BaseGeneratorCommand
{
/**
* @var string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Console\GeneratorCommand as BaseGeneratorCommand;

class MakeFieldset extends BaseGeneratorCommand
class MakeFieldsetCommand extends BaseGeneratorCommand
{
/**
* @var string
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public function boot()
], 'statamic');

$this->commands([
Console\MakeBlueprint::class,
Console\MakeFieldset::class,
Console\MakeBlueprintCommand::class,
Console\MakeFieldsetCommand::class,
Console\Importer::class,
Console\Export::class,
]);
Expand Down
4 changes: 3 additions & 1 deletion stubs/blueprint.stub
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ class {{ class }} extends Blueprint
return [
Tab::make('General', [
Section::make('General', [
Text::make('Title', 'title')->required(),
Text::make('title')
->displayName('Title')
->required()
]),
]),
];
Expand Down

0 comments on commit 9300768

Please sign in to comment.