Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ or
php artisan make:filament-api-handler Blog
```

#### Customize Handlers
If you want to customize the generated handlers, you can export them using the following command.

```bash
php artisan vendor:publish --tag=api-service-stubs
```

### Transform API Response

```bash
Expand Down
9 changes: 9 additions & 0 deletions src/ApiServiceServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ public function packageBooted(): void
SecurityScheme::http('bearer')
);
});

// Publish Stubs
if ($this->app->runningInConsole()) {
foreach (app(Filesystem::class)->files(__DIR__ . '/../stubs/') as $file) {
$this->publishes([
$file->getRealPath() => base_path("stubs/filament/{$file->getFilename()}"),
], static::$name . '-stubs');
}
}
}

protected function getAssetPackageName(): ?string
Expand Down