Skip to content

Commit

Permalink
Merge pull request #79 from kiwilan/develop
Browse files Browse the repository at this point in the history
v3.1.01
  • Loading branch information
ewilan-riviere authored Jul 25, 2024
2 parents 4d4c4d8 + 0e2b335 commit f001991
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ This version requires [PHP](https://www.php.net/) `8.2+` and supports [Laravel](
| Version | L9 | L10 | L11 |
| --------------------------------------------------------------------------------- | ------------------ | ------------------ | ------------------ |
| [v1.12.03](https://packagist.org/packages/kiwilan/typescriptable-laravel#1.12.03) | :white_check_mark: | :white_check_mark: | :x: |
| [v3+](https://packagist.org/packages/kiwilan/typescriptable-laravel) | :x: | :x: | :white_check_mark: |
| [v1.12.03](https://packagist.org/packages/kiwilan/typescriptable-laravel#1.12.03) | :white_check_mark: | :white_check_mark: | :x: |

You can install the package via composer:

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kiwilan/typescriptable-laravel",
"description": "PHP package for Laravel to type Eloquent models, routes, Spatie Settings with autogenerated TypeScript. If you want to use some helpers with Inertia, you can install associated NPM package.",
"version": "3.1.0",
"version": "3.1.01",
"keywords": [
"kiwilan",
"laravel",
Expand Down
Binary file modified docs/banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Typed/Route/Printer/PrinterRouteTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private function parseRouteParams(): string
->map(fn (RouteTypeItemParam $param) => "'{$param->name()}': App.Route.ParamType")
->join("\n ");

return " '$name}': {\n {$params}\n }";
return " '{$name}': {\n {$params}\n }";
} else {
return " '{$name}': never";
}
Expand Down
4 changes: 3 additions & 1 deletion src/Typed/Route/RouteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public function typescriptTypes(): ?string
private function parseRoutes(): Collection
{
if ($this->config->json === null) {
Artisan::call(RouteListCommand::class);
Artisan::call(RouteListCommand::class, [
'--json' => true,
]);
$json = Artisan::output();
$this->config->json = json_decode($json, true);
}
Expand Down

0 comments on commit f001991

Please sign in to comment.