Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@
"license": "MIT",
"require": {
"php": "^8.2",
"codedor/filament-link-picker": "dev-feature/filament-v4",
"codedor/filament-translatable-tabs": "dev-feature/filament-v4",
"codedor/filament-link-picker": "dev-feature/filament-v5",
"codedor/filament-translatable-tabs": "dev-feature/filament-v5",
"codedor/laravel-locale-collection": "^1.2",
"codedor/laravel-online-scope": "dev-feature/filament-v4",
"filament/filament": "^4.0",
"codedor/laravel-online-scope": "dev-feature/filament-v5",
"filament/filament": "^4.0|^5.0",
"illuminate/contracts": "^10.0|^11.0|^12.0",
"spatie/eloquent-sortable": "^4.0",
"spatie/laravel-navigation": "^1.2",
"spatie/laravel-package-tools": "^1.12",
"spatie/laravel-translatable": "^6.5"
},
"require-dev": {
"filament/upgrade": "^4.0",
"larastan/larastan": "^2.0|^3.0",
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.0|^8.0",
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
'translated link' => 'Translated link',
'override translation link' => 'If you want to override the link for this translation, you can do so here.',
'online' => 'Online',
'type' => 'Type',
];
1 change: 1 addition & 0 deletions resources/lang/nl/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
'label' => 'Label',
'override translation link' => 'Als u de link voor deze vertaling wilt overschrijven, kunt u dat hier doen.',
'online' => 'Online',
'type' => 'Type',
];
46 changes: 24 additions & 22 deletions src/Filament/Resources/MenuResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,39 @@
public static function form(\Filament\Schemas\Schema $schema): \Filament\Schemas\Schema
{
return $schema->components([
\Filament\Schemas\Components\Grid::make(1)->schema([
Components\TextInput::make('working_title')
->label(__('filament-menu::admin.working title'))
->autofocus()
->unique(ignorable: fn ($record) => $record)
->required(),
\Filament\Schemas\Components\Grid::make(1)
->schema([
Components\TextInput::make('working_title')
->label(__('filament-menu::admin.working title'))
->autofocus()
->unique(ignorable: fn ($record) => $record)
->required(),

Components\TextInput::make('identifier')
->label(__('filament-menu::admin.identifier'))
->unique(ignorable: fn ($record) => $record)
->hidden(fn () => ! is_superadmin())
->required(),
Components\TextInput::make('identifier')
->label(__('filament-menu::admin.identifier'))
->unique(ignorable: fn ($record) => $record)
->hidden(fn () => ! is_superadmin())
->required(),

Components\Textarea::make('description')
->label(__('filament-menu::admin.description'))
->rows(3),
Components\Textarea::make('description')
->label(__('filament-menu::admin.description'))
->rows(3),

Components\TextInput::make('depth')
->label(__('filament-menu::admin.depth'))
->hidden(fn () => ! is_superadmin())
->default(1)
->minValue(1)
->type('number')
->required(),
]),
Components\TextInput::make('depth')
->label(__('filament-menu::admin.depth'))
->hidden(fn () => ! is_superadmin())
->default(1)
->minValue(1)
->type('number')
->required(),
])
->columnSpanFull(),
]);
}

public static function table(Table $table): Table
{
return $table

Check failure on line 54 in src/Filament/Resources/MenuResource.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to deprecated method actions() of class Filament\Tables\Table: Use `recordActions()` instead.
->columns([
Columns\TextColumn::make('working_title')
->label(__('filament-menu::admin.working title')),
Expand Down
Loading