docs: update widget section

This commit is contained in:
Leandro Ferreira
2025-06-26 09:35:43 -03:00
parent 2c4ebb45d7
commit 2d0821216a
2 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ Visit your Livewire component in the browser, and you should see the table.
These packages allow you to use their components within Livewire components.
For example, if your table uses [Actions](action#setting-up-the-livewire-component), remember to implement the `HasActions` interface and include the `InteractsWithActions` trait.
If you are using any other [Filament components](overview#package-components) in your table, make sure to install and integrate the corresponding package as well.
If you are using any other [Filament components](overview#package-components) in your table, make sure to install and integrate the corresponding package as well.
</Aside>
## Building a table for an Eloquent relationship
+10 -1
View File
@@ -12,7 +12,11 @@ import Aside from "@components/Aside.astro"
If it's not installed, consult the [installation guide](../introduction/installation#installing-the-individual-components) and configure the **individual components** according to the instructions.
</Aside>
## Introduction
## Creating a widget
Use the `make:filament-widget` command to generate a new widget. For details on customization and usage, see the [widgets section](../widgets).
## Adding the widget
Since widgets are Livewire components, you can easily render a widget in any Blade view using the `@livewire` directive:
@@ -21,3 +25,8 @@ Since widgets are Livewire components, you can easily render a widget in any Bla
@livewire(\App\Livewire\Dashboard\PostsChart::class)
</div>
```
<Aside variant="info">
If you're using a [table widget](../widgets/overview#table-widgets), make sure to install `filament/tables` as well.
Refer to the [installation guide](../introduction/installation#installing-the-individual-components) and follow the steps to configure the **individual components** properly.
</Aside>