From 19ed8ae27713150deae4cc805c599335773cc301 Mon Sep 17 00:00:00 2001 From: Alfonso Bribiesca Date: Fri, 13 Oct 2023 03:41:07 -0600 Subject: [PATCH] feat: limit article meta description (#221) --- app/Filament/Resources/ArticleResource.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/ArticleResource.php b/app/Filament/Resources/ArticleResource.php index 918b0f48d..7ac09abf8 100644 --- a/app/Filament/Resources/ArticleResource.php +++ b/app/Filament/Resources/ArticleResource.php @@ -70,6 +70,8 @@ public static function form(Form $form): Form ->default(ArticleCategoryEnum::News->value) ->required(), + Textarea::make('meta_description')->nullable()->autosize()->columnSpan('full')->maxLength(160)->helperText('Max 160 characters'), + SpatieMediaLibraryFileUpload::make('cover') ->collection('cover') ->columnSpan('full') @@ -78,8 +80,8 @@ public static function form(Form $form): Form ->imageCropAspectRatio('16:9') ->rules(['max:5120']), - Textarea::make('meta_description')->nullable()->autosize()->columnSpan('full'), Textarea::make('content')->required()->autosize()->columnSpan('full'), + Select::make('user_id') ->relationship( name: 'user', @@ -99,6 +101,7 @@ public static function table(Table $table): Table ->label('Title') ->sortable() ->searchable(), + TextColumn::make('category') ->label('Category') ->sortable()