Skip to content

Commit 24927f1

Browse files
authored
Fix method call to retrieve current authed user (#67)
1 parent b41e585 commit 24927f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/docs/livewire/creating-chirps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Finally, we are also clearing the `message` form field value.
321321

322322
## Creating a relationship
323323

324-
You may have noticed in the previous step that we called a `chirps` method on the `$request->user()` object. We need to create this method on our `User` model to define a ["has many"](https://laravel.com/docs/eloquent-relationships#one-to-many) relationship:
324+
You may have noticed in the previous step that we called a `chirps` method on the `auth()->user()` object. We need to create this method on our `User` model to define a ["has many"](https://laravel.com/docs/eloquent-relationships#one-to-many) relationship:
325325

326326
```php filename=app/Models/User.php
327327
<?php

0 commit comments

Comments
 (0)