Releases: tomatophp/filament-types
v1.0.22
Full Changelog: v1.0.21...v1.0.22
v1.0.21
Use Type Column
add ->allowDescription()
method to the Column to make it easy to show up the description of the type in hover as a tooltip
use TomatoPHP\FilamentTypes\Components\TypeColumn;
TypeColumn::make('type')
...
->allowDescription()
- allow Type ordering
- update table grouping setting
- disable type if
for
not set on filters
Full Changelog: v1.0.20...v1.0.21
v1.0.20
Use Type Column
you can use type column in your table like this
use TomatoPHP\FilamentTypes\Components\TypeColumn;
TypeColumn::make('type')
->for('users')
->type('status')
->searchable(),
Full Changelog: v1.0.19...v1.0.20
v1.0.19
fix migration rollback
Full Changelog: v1.0.18...v1.0.19
v1.0.18
update base type page translation
Full Changelog: v1.0.17...v1.0.18
v1.0.17
Use Type Base Page
you can create a page for selected type by just extand base type page
use TomatoPHP\FilamentTypes\Pages\BaseTypePage;
use TomatoPHP\FilamentTypes\Services\Contracts\Type;
class NotesGroups extends BaseTypePage
{
public function getTitle(): string
{
return "Notes Groups";
}
public function getType(): string
{
return "groups";
}
public function getFor(): string
{
return "notes";
}
public function getBackUrl()
{
return ManageNotes::getUrl(); // TODO: Change the autogenerated stub
}
public function getTypes(): array
{
return [
Type::make('todo')
->name([
"ar" => "مهام",
"en" => "TODO"
])
->color('#1461e3')
->icon('heroicon-o-list-bullet'),
Type::make('ideas')
->name([
"ar" => "أفكار",
"en" => "Ideas"
])
->color('#13e0da')
->icon('heroicon-o-sparkles'),
Type::make('saved')
->name([
"ar" => "محفوظ",
"en" => "Saved"
])
->color('#29a82e')
->icon('heroicon-o-arrow-down-on-square'),
];
}
}
it will be not appear on the navigation menu by default but you can change that by just use this method
public static function shouldRegisterNavigation(): bool
{
return true;
}
Use Type Component
if you like to use a type as a package we create a blade component for you to make it easy to use anywhere on your app like this
<x-tomato-type :type="$type" label="Group"/>
Full Changelog: v1.0.16...v1.0.17
v1.0.16
check if icon exists
Full Changelog: v1.0.15...v1.0.16
v1.0.15
update icons packages by @3x1io
Full Changelog: v1.0.14...v1.0.15
v1.0.14
- remove unique key by @3x1io
- add validation to the key with type/for by @3x1io
- add empty state option on the column by @3x1io
return [
/**
* Empty State
*
* If type Column is Empty Put This Message
*/
"empty_state" => null,
];
you can add the empty state here and it will appear on all empty type columns.
Full Changelog: v1.0.13...v1.0.14
v1.0.13
Full Changelog: v1.0.12...v1.0.13