Skip to content

Commit cc924bc

Browse files
Merge pull request #27 from AndrewMast/patch-1
Fix typo in readme and change highlighting for notes
2 parents 97bbe67 + bc50b15 commit cc924bc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
Laravel Wayfinder bridges your Laravel backend and TypeScript frontend with zero friction. It automatically generates fully-typed, importable TypeScript functions for your controllers and routes — so you can call your Laravel endpoints directly in your client code just like any other function. No more hardcoding URLs, guessing route parameters, or syncing backend changes manually.
66

7-
**Note:** Wayfinder is currently in Beta, the API is subject to change prior to the v1.0.0 release. All notable changes will be documented in the [changelog](./CHANGELOG.md).
7+
> [!IMPORTANT]
8+
> Wayfinder is currently in Beta, the API is subject to change prior to the v1.0.0 release. All notable changes will be documented in the [changelog](./CHANGELOG.md).
89
910
## Installation
1011

@@ -110,7 +111,8 @@ update({ post: 1, author: 2 });
110111
update({ post: { id: 1 }, author: { id: 2 } });
111112
```
112113

113-
**Note:** If you have are using a JavaScript [reserved word](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#reserved_words) as a method on your controller, Wayfinder will rename it to `[method name]Method` when generating its functions. This is because these words are not allowed as variable declarations.
114+
> [!NOTE]
115+
> If you are using a JavaScript [reserved word](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#reserved_words) such as `delete` or `import`, as a method in your controller, Wayfinder will rename it to `[method name]Method` (`deleteMethod`, `importMethod`) when generating its functions. This is because these words are not allowed as variable declarations in JavaScript.
114116
115117
If you've specified a key for the parameter binding, Wayfinder will detect this and allow you to pass the value in as a property on an object:
116118

@@ -142,7 +144,8 @@ import PostController from "@actions/App/Http/Controllers/PostController";
142144
PostController.show(1);
143145
```
144146

145-
**Note:** In the example above, importing the entire controller prevents the `PostController` from being tree-shaken, so all `PostController` actions will be included in your final bundle.
147+
> [!NOTE]
148+
> In the example above, importing the entire controller prevents the `PostController` from being tree-shaken, so all `PostController` actions will be included in your final bundle.
146149
147150
### Importing Named Routes
148151

0 commit comments

Comments
 (0)