Skip to content

Commit

Permalink
Update 09-configuration.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin authored Apr 11, 2024
1 parent 1e15c43 commit dd7b1bb
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions packages/panels/docs/09-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,6 @@ public function panel(Panel $panel): Panel
}
```

## Disabling broadcasting

By default, broadcasting is enabled for every panel once Laravel Echo is installed and websockets are set up. This means Echo will attempt to connect to your websocket server in every panel. To disable this you can use the `broadcasting()` method:

```php
use Filament\Panel;

public function panel(Panel $panel): Panel
{
return $panel
// ...
->broadcasting(false);
}
```

## Unsaved changes alerts

You may alert users if they attempt to navigate away from a page without saving their changes. This is applied on [Create](resources/creating-records) and [Edit](resources/editing-records) pages of a resource, as well as any open action modals. To enable this feature, you can use the `unsavedChangesAlerts()` method:
Expand Down Expand Up @@ -359,3 +344,18 @@ public function panel(Panel $panel): Panel
], isPersistent: true);
}
```

## Disabling broadcasting

By default, Laravel Echo will automatically connect for every panel, if credentials have been set up in the [published `config/filament.php` configuration file](installation#publishing-configuration). To disable this automatic connection in a panel, you can use the `broadcasting(false)` method:

```php
use Filament\Panel;

public function panel(Panel $panel): Panel
{
return $panel
// ...
->broadcasting(false);
}
```

0 comments on commit dd7b1bb

Please sign in to comment.