You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/03-resources/01-overview.md
+1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Overview
3
3
---
4
+
4
5
## Overview
5
6
6
7
Resources are static classes that are used to build CRUD interfaces for your Eloquent models. They describe how administrators should be able to interact with data from your app - using tables and forms.
Copy file name to clipboardexpand all lines: docs/03-resources/07-relation-managers.md
+1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Managing relationships
3
3
---
4
+
4
5
## Choosing the right tool for the job
5
6
6
7
Filament provides many ways to manage relationships in the app. Which feature you should use depends on the type of relationship you are managing, and which UI you are looking for.
Copy file name to clipboardexpand all lines: docs/09-advanced/03-assets.md
+1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Registering assets
3
3
---
4
+
4
5
## Overview
5
6
6
7
All packages in the Filament ecosystem share an asset management system. This allows both official plugins and third-party plugins to register CSS and JavaScript files that can then be consumed by Blade views.
Copy file name to clipboardexpand all lines: docs/11-plugins/01-getting-started.md
+1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Getting started
3
3
---
4
+
4
5
## Overview
5
6
6
7
While Filament comes with virtually any tool you'll need to build great apps, sometimes you'll need to add your own functionality either for just your app or as redistributable packages that other developers can include in their own apps. This is why Filament offers a plugin system that allows you to extend its functionality.
Copy file name to clipboardexpand all lines: docs/11-plugins/02-panel-plugins.md
+1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Plugin development
3
3
---
4
+
4
5
## Overview
5
6
6
7
The basis of Filament plugins are Laravel packages. They are installed into your Filament project via Composer, and follow all the standard techniques, like using service providers to register routes, views, and translations. If you're new to Laravel package development, here are some resources that can help you grasp the core concepts:
Optionally, the `collaptible()` and `collapsed()` methods accept a boolean value to control if the repeater should be collapsible and collapsed or not:
233
+
Optionally, the `collapsible()` and `collapsed()` methods accept a boolean value to control if the repeater should be collapsible and collapsed or not:
Copy file name to clipboardexpand all lines: packages/schemas/docs/02-forms/20-custom.md
+1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Custom fields
3
3
---
4
+
4
5
## View fields
5
6
6
7
Aside from [building custom fields](#custom-field-classes), you may create "view" fields which allow you to create custom fields without extra PHP classes.
Copy file name to clipboardexpand all lines: packages/schemas/docs/04-layouts/01-overview.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
title: Overview
3
3
---
4
4
import UtilityInjection from "@components/UtilityInjection.astro"
5
+
5
6
## Overview
6
7
7
8
Filament schemas are not limited to just displaying [form fields](../forms) and [infolist entries](../infolists). You can also use "layout components" to organize them into an infinitely nestable structure.
@@ -24,10 +25,10 @@ Grid::make(2)
24
25
Filament ships with some layout components, suitable for arranging your components depending on your needs:
25
26
26
27
-[Grid](grid)
27
-
-[Fieldset](fieldset)
28
+
-[Section](section)
28
29
-[Tabs](tabs)
29
30
-[Wizard](wizard)
30
-
-[Section](section)
31
+
-[Fieldset](fieldset)
31
32
-[Split](split)
32
33
33
34
You may also [create your own custom layout components](custom) to organize schemas however you wish.
Copy file name to clipboardexpand all lines: packages/schemas/docs/04-layouts/02-grid.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Grid
3
3
---
4
+
import UtilityInjection from "@components/UtilityInjection.astro"
4
5
5
6
## Overview
6
7
@@ -15,6 +16,8 @@ All layout components have a `columns()` method that you can use in a couple of
15
16
16
17
Breakpoints (`sm`, `md`, `lg`, `xl`, `2xl`) are defined by Tailwind, and can be found in the [Tailwind documentation](https://tailwindcss.com/docs/responsive-design#overview).
17
18
19
+
<UtilityInjectionset="layoutComponents"version="4.x">As well as allowing a static value, the `columns()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
20
+
18
21
## Controlling how many columns a component should span
19
22
20
23
In addition to specifying how many columns a layout component should have, you may also specify how many columns a component should fill within the parent grid, using the `columnSpan()` method. This method accepts an integer or an array of breakpoints and column spans:
@@ -23,13 +26,15 @@ In addition to specifying how many columns a layout component should have, you m
23
26
-`columnSpan(['md' => 2, 'xl' => 4])` will make the component fill up to 2 columns on medium devices, and up to 4 columns on extra large devices. The default breakpoint for smaller devices uses 1 column, unless you use a `default` array key.
24
27
-`columnSpan('full')` or `columnSpanFull()` or `columnSpan(['default' => 'full'])` will make the component fill the full width of the parent grid, regardless of how many columns it has.
25
28
29
+
<UtilityInjectionset="layoutComponents"version="4.x">As well as allowing a static value, the `columnSpan()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
30
+
26
31
## An example of a responsive grid layout
27
32
28
33
In this example, we have a schema with a [section](section) layout component. Since all layout components support the `columns()` method, we can use it to create a responsive grid layout within the section itself.
29
34
30
35
We pass an array to `columns()` as we want to specify different numbers of columns for different breakpoints. On devices smaller than the `sm`[Tailwind breakpoint](https://tailwindcss.com/docs/responsive-design#overview), we want to have 1 column, which is default. On devices larger than the `sm` breakpoint, we want to have 3 columns. On devices larger than the `xl` breakpoint, we want to have 6 columns. On devices larger than the `2xl` breakpoint, we want to have 8 columns.
31
36
32
-
Inside the section, we have a [text input](../../forms/fields/text-input). Since text inputs are form fields and all components have a `columnSpan()` method, we can use it to specify how many columns the text input should fill. On devices smaller than the `sm` breakpoint, we want the text input to fill 1 column, which is default. On devices larger than the `sm` breakpoint, we want the text input to fill 2 columns. On devices larger than the `xl` breakpoint, we want the text input to fill 3 columns. On devices larger than the `2xl` breakpoint, we want the text input to fill 4 columns.
37
+
Inside the section, we have a [text input](../forms/text-input). Since text inputs are form fields and all components have a `columnSpan()` method, we can use it to specify how many columns the text input should fill. On devices smaller than the `sm` breakpoint, we want the text input to fill 1 column, which is default. On devices larger than the `sm` breakpoint, we want the text input to fill 2 columns. On devices larger than the `xl` breakpoint, we want the text input to fill 3 columns. On devices larger than the `2xl` breakpoint, we want the text input to fill 4 columns.
33
38
34
39
```php
35
40
use Filament\Forms\Components\TextInput;
@@ -101,3 +106,5 @@ Grid::make()
101
106
```
102
107
103
108
In this example, the grid has 3 columns on small devices, 6 columns on extra large devices, and 8 columns on extra extra large devices. The text input will start at column 2 on small devices, column 3 on extra large devices, and column 4 on extra extra large devices. This is essentially producing a layout whereby the text input always starts halfway through the grid, regardless of how many columns the grid has.
109
+
110
+
<UtilityInjectionset="layoutComponents"version="4.x">As well as allowing a static value, the `columnStart()` method also accepts a function to dynamically calculate it. You can inject various utilities into the function as parameters.</UtilityInjection>
0 commit comments