use aside

This commit is contained in:
Dan Harrin
2025-02-28 12:27:18 +00:00
parent cc628919dc
commit 5aa3af5811
6 changed files with 37 additions and 24 deletions
+3 -1
View File
@@ -31,7 +31,9 @@ Filament is designed to be highly extensible, allowing you to add your own UI co
The vast majority of plugins in the ecosystem are open-source and free to use. Some premium plugins are available for purchase, often offering enhanced customer support and quality.
> Plugins not maintained by Filament team are created and managed by independent authors. While these plugins can enhance your experience, Filament cannot guarantee their quality, security, compatibility, or maintenance. We recommend reviewing the plugin's code, documentation, and user feedback before installation.
<Aside variant="warning">
Plugins not maintained by Filament team are created and managed by independent authors. While these plugins can enhance your experience, Filament cannot guarantee their quality, security, compatibility, or maintenance. We recommend reviewing the plugin's code, documentation, and user feedback before installation.
</Aside>
You can browse an extensive list of official and community plugins on the [Filament website](/plugins).
+6 -2
View File
@@ -47,7 +47,9 @@ php artisan filament:install --panels
This will create and register a new [Laravel service provider](https://laravel.com/docs/providers) called `app/Providers/Filament/AdminPanelProvider.php`.
> If you get an error when accessing your panel, check that the service provider is registered in `bootstrap/providers.php`. If it's not registered, you'll need to [add it manually](https://laravel.com/docs/providers#registering-providers).
<Aside variant="tip">
If you get an error when accessing your panel, check that the service provider is registered in `bootstrap/providers.php`. If it's not registered, you'll need to [add it manually](https://laravel.com/docs/providers#registering-providers).
</Aside>
You can create a new user account using the following command:
@@ -106,7 +108,9 @@ If you only want to use the set of [Blade UI components](../components/blade), y
To quickly set up Filament in a new Laravel project, run the following commands to install [Livewire](https://livewire.laravel.com), [Alpine.js](https://alpinejs.dev), and [Tailwind CSS](https://tailwindcss.com):
> Warning: These commands will overwrite existing files in your application. Only run them in a new Laravel project!
<Aside variant="warning">
These commands will overwrite existing files in your application. Only run them in a new Laravel project!
</Aside>
Run the following command to install the Filament frontend assets:
+1 -12
View File
@@ -3,7 +3,7 @@ title: Help
contents: false
---
> We offer a variety of support options, mostly free of charge. If you need help, the community is here for you!
We offer a variety of support options, mostly free of charge. If you need help, the community is here for you!
## Discord
@@ -36,17 +36,6 @@ If you have a feature request, you can create a discussion on GitHub [following
If you're looking for dedicated help with your Filament project, we're here for you. Whether you're a solo developer or running a large company, we provide support and development services that fit your needs. More information can be found on our [consulting page](/consulting).
## Laracasts
[Laracasts](https://laracasts.com) has a dedicated [Filament help section](https://laracasts.com/discuss/channels/filament) where you can ask questions and get help from their community.
Additionally, on Laracasts you can find two excellent courses about Filament:
- [Rapid Laravel Apps With Filament](https://laracasts.com/series/rapid-laravel-development-with-filament)
- [Build Advanced Components for Filament](https://laracasts.com/series/build-advanced-components-for-filament) by one of the creators of Filament.
> An active subscription may be required to access parts of these courses.
## Google
Since we make use of [Answer Overflow](https://www.answeroverflow.com/c/883083792112300104) on our [Discord](#discord) server, you are often one Google search away from finding an answer to your question or at least a hint on how to solve your problem. You may also find results from [GitHub](#github), the [Laracasts forum](#laracasts), or even Stack Overflow.
+3 -1
View File
@@ -3,7 +3,9 @@ title: Contributing
contents: false
---
> Parts of this guide are adapted from [Laravel's contribution guide](https://laravel.com/docs/contributions), which served as valuable inspiration.
<Aside variant="info">
Parts of this guide are adapted from [Laravel's contribution guide](https://laravel.com/docs/contributions), which served as valuable inspiration.
</Aside>
## Reporting bugs
+21 -7
View File
@@ -163,7 +163,9 @@ Toggle::make('is_admin')
->dehydrated()
```
> If you choose to dehydrate the field, a skilled user could still edit the field's value by manipulating Livewire's JavaScript.
<Aside variant="danger">
If you choose to dehydrate the field, a skilled user could still edit the field's value by manipulating Livewire's JavaScript.
</Aside>
Optionally, you may pass a boolean value to control if the field should be dehydrated or not:
@@ -209,7 +211,9 @@ Toggle::make('is_admin')
->disabled(fn (string $operation): bool => in_array($operation, ['edit', 'view']))
```
> Note: The `disabledOn()` method will overwrite any previous calls to the `disabled()` method, and vice versa.
<Aside variant="warning">
The `disabledOn()` method will overwrite any previous calls to the `disabled()` method, and vice versa.
</Aside>
## Hiding a field
@@ -244,7 +248,9 @@ TextInput::make('name')
<UtilityInjection set="formFields" version="4.x">As well as allowing a static value, the `visible()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
> Note: If both `hidden()` and `visible()` are used, they both need to indicate that the field should be visible for it to be shown.
<Aside variant="info">
If both `hidden()` and `visible()` are used, they both need to indicate that the field should be visible for it to be shown.
</Aside>
### Hiding a field using JavaScript
@@ -307,7 +313,9 @@ Toggle::make('is_admin')
JS)
```
> Note: If both `hiddenJs()` and `visibleJs()` are used, they both need to indicate that the field should be visible for it to be shown.
<Aside variant="info">
If both `hiddenJs()` and `visibleJs()` are used, they both need to indicate that the field should be visible for it to be shown.
</Aside>
### Hiding a field based on the current operation
@@ -341,7 +349,9 @@ Toggle::make('is_admin')
->hidden(fn (string $operation): bool => in_array($operation, ['edit', 'view']))
```
> Note: The `hiddenOn()` method will overwrite any previous calls to the `hidden()` method, and vice versa.
<Aside variant="warning">
The `hiddenOn()` method will overwrite any previous calls to the `hidden()` method, and vice versa.
</Aside>
Alternatively, you may use the `visibleOn()` method to control if the field should be hidden or not. In some situations, this may help to make your code more readable:
@@ -355,7 +365,9 @@ Toggle::make('is_admin')
->visibleOn(['create', 'edit'])
```
> Note: The `visibleOn()` method will overwrite any previous calls to the `visible()` method, and vice versa.
<Aside variant="info">
The `visibleOn()` method will overwrite any previous calls to the `visible()` method, and vice versa.
</Aside>
## Autofocusing a field when the schema is loaded
@@ -528,7 +540,9 @@ function (string $operation) {
}
```
> You can manually set a schema's operation using the `$schema->operation()` method.
<Aside variant="info">
You can manually set a schema's operation using the `$schema->operation()` method.
</Aside>
### Injecting the current Livewire component instance
+3 -1
View File
@@ -488,7 +488,9 @@ MorphToSelect::make('commentable')
<UtilityInjection set="formFields" version="4.x" extras="Eloquent query builder;;Illuminate\Database\Eloquent\Builder;;$query;;The query builder to modify.">The `modifyOptionsQueryUsing()` method can inject various utilities into the function as parameters.</UtilityInjection>
> Many of the same options in the select field are available for `MorphToSelect`, including `searchable()`, `preload()`, `native()`, `allowHtml()`, and `optionsLimit()`.
<Aside variant="tip">
Many of the same options in the select field are available for `MorphToSelect`, including `searchable()`, `preload()`, `native()`, `allowHtml()`, and `optionsLimit()`.
</Aside>
## Allowing HTML in the option labels