Skip to content

Commit

Permalink
feat: limit article meta description (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsobries authored Oct 13, 2023
1 parent dc9e740 commit 19ed8ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Filament/Resources/ArticleResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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',
Expand All @@ -99,6 +101,7 @@ public static function table(Table $table): Table
->label('Title')
->sortable()
->searchable(),

TextColumn::make('category')
->label('Category')
->sortable()
Expand Down

0 comments on commit 19ed8ae

Please sign in to comment.