mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-01 15:09:33 +08:00
docs: update widget section
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user