@@ -62,7 +62,7 @@ Although it's handy to pass a model instance to the `turbo_stream()` function -
62
62
turbo_stream()
63
63
->target('comments')
64
64
->action('append')
65
- ->view('comments._comment ', ['comment' => $comment]);
65
+ ->view('comments.partials.comment ', ['comment' => $comment]);
66
66
```
67
67
68
68
There are also shorthand methods which may be used as well:
@@ -122,7 +122,7 @@ For both the `before` and `after` methods you need additional calls to specify t
122
122
``` php
123
123
turbo_stream()
124
124
->before($comment)
125
- ->view('comments._flash_message ', [
125
+ ->view('comments.partials.flash_message ', [
126
126
'message' => __('Comment created!'),
127
127
]);
128
128
```
@@ -199,7 +199,7 @@ When creating Turbo Streams using the builders, you may also specify the CSS cla
199
199
turbo_stream()
200
200
->targets('.comment')
201
201
->action('append')
202
- ->view('comments._comment ', ['comment' => $comment]);
202
+ ->view('comments.partials.comment ', ['comment' => $comment]);
203
203
```
204
204
205
205
## Turbo Stream Macros
@@ -281,7 +281,7 @@ return turbo_stream([
281
281
->append($comment)
282
282
->target(dom_id($comment->post, 'comments')),
283
283
turbo_stream()
284
- ->update(dom_id($comment->post, 'comments_count'), view('posts._comments_count ', [
284
+ ->update(dom_id($comment->post, 'comments_count'), view('posts.partials.comments_count ', [
285
285
'post' => $comment->post,
286
286
])),
287
287
]);
@@ -308,7 +308,7 @@ Here's an example of a more complex custom Turbo Stream view:
308
308
309
309
<turbo-stream target="@domid($comment->post, 'comments')" action="append">
310
310
<template>
311
- @include('comments._comment ', ['comment' => $comment])
311
+ @include('comments.partials.comment ', ['comment' => $comment])
312
312
</template>
313
313
</turbo-stream>
314
314
```
@@ -319,7 +319,7 @@ Remember, these are Blade views, so you have the full power of Blade at your han
319
319
@if (session()->has('status'))
320
320
<turbo-stream target="notice" action="append">
321
321
<template>
322
- @include('layouts._flash ')
322
+ @include('layouts.partials.flash ')
323
323
</template>
324
324
</turbo-stream>
325
325
@endif
@@ -331,7 +331,7 @@ Similar to the `<x-turbo::frame>` Blade component, there's also a `<x-turbo::str
331
331
@include('layouts.turbo.flash_stream')
332
332
333
333
<x-turbo::stream :target="[$comment->post, 'comments']" action="append">
334
- @include('comments._comment ', ['comment' => $comment])
334
+ @include('comments.partials.comment ', ['comment' => $comment])
335
335
</x-turbo::stream>
336
336
```
337
337
0 commit comments