Skip to content

Commit

Permalink
readme cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
0wain committed Jul 21, 2024
1 parent 9da18ab commit d819fa4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Filament Gaze

πŸ“‚ See who's viewing a resource in Filament PHP πŸ—„οΈ
πŸ‘€ See who's viewing a resource in Filament PHP πŸ”­

This packages allows you to tell a display when other users are viewing the same resource in Filament PHP.
![](media/1.png)

This packages allows you to display when other users are viewing the same resource in Filament PHP.

https://packagist.org/packages/owainjones74/filament-gaze

Expand Down Expand Up @@ -50,7 +52,13 @@ GazeBanner::make()
### Identifier Example
```php
GazeBanner::make()
->identifier('123'),
->identifier('any-order'),
```

### Hiding Gaze Banner on Create Form Example
```php
GazeBanner::make()
->hidden(fn (?Order $record) => $record === null),
```


Expand All @@ -59,15 +67,15 @@ GazeBanner::make()
### `->pollTimer($timeInSecs)`

#### Description
`polltimer` can be used to set how often the browser should inform Filament that the use is still viewing the page, along with getting an updated list of other users. It is advised not to put this value too short, as it can cause rate limiting issues. But also not to have this value too long, as it will result in a delayed update of new users viewing the page.
`polltimer` can be used to set how often the browser should inform Filament that the use is still viewing the page, along with getting an updated list of other users also viewing. It is advised not to put this value too short, as it can cause rate limiting issues. But also not to have this value too long, as it will result in a delayed update of new users viewing the page.

#### Arguments
`timeInSeconds` - (int) The amount of time in seconds between each poll. Default is 30 seconds.

### `->identifier($name)`

#### Description
`identifier` is used as a unique identifier for this gaze banner. Any other gaze banners with the same identifier will share the same list of active users. This can be useful if you want 2 difference resources to share the same list of active viewing users.
`identifier` is used as a unique identifier for this gaze banner. Any other gaze banners with the same identifier will share the same list of active users. This can be useful if you want 2 or more difference resources to share the same list of active viewing users.

#### Arguments
`name` - (string) The name of the identifier. Default is the resource's model class combines with model Id.
Binary file added media/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d819fa4

Please sign in to comment.