Skip to content

Commit

Permalink
3.3.0 - Docs Update (#1768)
Browse files Browse the repository at this point in the history
* Adjust column documentation (#1767)

---------

Co-authored-by: lrljoe <[email protected]>
  • Loading branch information
lrljoe and lrljoe authored Jul 11, 2024
1 parent f642ce0 commit d614186
Show file tree
Hide file tree
Showing 18 changed files with 301 additions and 31 deletions.
20 changes: 18 additions & 2 deletions docs/column-types/array_column.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Array Columns (beta)
weight: 1
weight: 2
---

Array columns provide an easy way to work with and display an array of data from a field.
Expand All @@ -19,4 +19,20 @@ You may define the default/empty value using the "emptyValue" method
```
ArrayColumn::make('notes', 'name')
->emptyValue('Unknown'),
```
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
20 changes: 18 additions & 2 deletions docs/column-types/avg_column.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Avg Columns (beta)
weight: 2
weight: 3
---

Avg columns provide an easy way to display the "Average" of a field on a relation.
Expand All @@ -11,4 +11,20 @@ Avg columns provide an easy way to display the "Average" of a field on a relatio
->sortable(),
```

The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
18 changes: 17 additions & 1 deletion docs/column-types/boolean_columns.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Boolean Columns
weight: 3
weight: 4
---

Boolean columns are good if you have a column type that is a true/false, or 0/1 value.
Expand Down Expand Up @@ -79,3 +79,19 @@ If you would like the BooleanColumn to display a plain Yes/No, you can set:
BooleanColumn::make('Active')
->yesNo()
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
9 changes: 8 additions & 1 deletion docs/column-types/button_group_column.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Button Group Columns
weight: 4
weight: 5
---

Button group columns let you provide an array of LinkColumns to display in a single cell.
Expand Down Expand Up @@ -32,3 +32,10 @@ ButtonGroupColumn::make('Actions')
}),
]),
```


Please also see the following for other available methods:
- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods](Available Methods)
- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection](Column Selection)
- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header](Secondary Header)
- [https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer](Footer)
18 changes: 17 additions & 1 deletion docs/column-types/color_columns.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Color Columns
weight: 5
weight: 6
---

Color columns provide an easy way to a Color in a Column
Expand Down Expand Up @@ -39,3 +39,19 @@ You may also specify attributes to use on the div displaying the color, to adjus
];
}),
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
17 changes: 16 additions & 1 deletion docs/column-types/component_column.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Component Columns
weight: 6
weight: 7
---

Component columns let you specify a component name and attributes and provides the column value to the slot.
Expand All @@ -26,3 +26,18 @@ ComponentColumn::make('E-mail', 'email')
]),
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
20 changes: 18 additions & 2 deletions docs/column-types/count_column.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Count Columns (beta)
weight: 7
weight: 8
---

Count columns provide an easy way to display the "Count" of a relation.
Expand All @@ -11,4 +11,20 @@ Count columns provide an easy way to display the "Count" of a relation.
->sortable(),
```

The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
17 changes: 16 additions & 1 deletion docs/column-types/date_columns.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Date Columns
weight: 8
weight: 9
---

Date columns provide an easy way to display dates in a given format, without having to use repetitive format() methods or partial views.
Expand All @@ -26,3 +26,18 @@ DateColumn::make('Last Charged', 'last_charged_at')
->emptyValue('Not Found'),
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
18 changes: 17 additions & 1 deletion docs/column-types/image_columns.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Image Columns
weight: 9
weight: 10
---

Image columns provide a way to display images in your table without having to use `format()` or partial views:
Expand All @@ -24,3 +24,19 @@ ImageColumn::make('Avatar')
'alt' => $row->name . ' Avatar',
]),
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
18 changes: 17 additions & 1 deletion docs/column-types/link_columns.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Link Columns
weight: 10
weight: 11
---

Link columns provide a way to display HTML links in your table without having to use `format()` or partial views:
Expand All @@ -22,3 +22,19 @@ LinkColumn::make('Action')
'alt' => $row->name . ' Avatar',
]),
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
29 changes: 28 additions & 1 deletion docs/column-types/livewire_component_column.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
---
title: Livewire Component (beta)
weight: 11
weight: 12
---

Livewire Component Columns allow for the use of a Livewire Component as a Column.

This is **not recommended** as due to the nature of Livewire, it becomes inefficient at scale.

## component
```
LivewireComponentColumn::make('Action')
->title(fn($row) => 'Edit')
->component('PathToLivewireComponent'),
```

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
31 changes: 31 additions & 0 deletions docs/column-types/standard_column.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Standard Column
weight: 1
---

A standard Column has a multitude of different options, making it simple for you to display your data, as documented below:

<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/creating-columns">Creating Columns</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/relationships">Relationships</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/anonymous_columns">Anonymous Columns</a>
</li>

</ul>
20 changes: 18 additions & 2 deletions docs/column-types/sum_column.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Sum Columns (beta)
weight: 12
weight: 13
---

Sum columns provide an easy way to display the "Sum" of a field on a relation.
Expand All @@ -11,4 +11,20 @@ Sum columns provide an easy way to display the "Sum" of a field on a relation.
->sortable(),
```

The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.
The "sortable()" callback can accept a callback, or you can use the default behaviour, which calculates the correct field to sort on.

Please also see the following for other available methods:
<ul>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/available-methods">Available Methods</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/column-selection">Column Selection</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/secondary-header">Secondary Header</a>
</li>
<li>
<a href="https://rappasoft.com/docs/laravel-livewire-tables/v3/columns/footer">Footer</a>
</li>
</ul>
Loading

0 comments on commit d614186

Please sign in to comment.