language files combined, settings fixed, "new" badge integrated
This commit is contained in:
@@ -12,18 +12,31 @@ use Filament\Tables;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Fieldset;
|
||||
|
||||
class SettingResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Setting::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-cog';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
//
|
||||
Forms\Components\TextInput::make('key')
|
||||
->label(__('Key'))
|
||||
->required()
|
||||
->maxLength(255)
|
||||
->hiddenOn('edit'),
|
||||
Forms\Components\Fieldset::make()
|
||||
->label(fn (?Setting $record) => $record ? $record->key : __('New Setting'))
|
||||
->schema([
|
||||
TextInput::make('value')
|
||||
->label(__('Value'))
|
||||
->disableLabel()
|
||||
])
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -31,7 +44,8 @@ class SettingResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
//
|
||||
Tables\Columns\TextColumn::make('key')->label(__('Key'))->searchable()->sortable(),
|
||||
Tables\Columns\TextColumn::make('value')->label(__('Value'))->searchable()->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
@@ -39,6 +53,7 @@ class SettingResource extends Resource
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
])
|
||||
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
|
||||
Reference in New Issue
Block a user