wip: article AI polish, category SEO fields, cover generator, membership plan seeder
This commit is contained in:
@@ -5,8 +5,8 @@ declare(strict_types=1);
|
||||
namespace App\Filament\Resources\Categories\Pages;
|
||||
|
||||
use App\Filament\Resources\Categories\CategoryResource;
|
||||
use App\Filament\Resources\Pages\ListRecords;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListCategories extends ListRecords
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Categories\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
@@ -16,16 +17,25 @@ class CategoryForm
|
||||
TextInput::make('name')
|
||||
->label(__('admin.fields.name'))
|
||||
->required(),
|
||||
TextInput::make('description')
|
||||
->label(__('admin.fields.description'))
|
||||
->maxLength(255)
|
||||
->helperText(__('admin.helpers.category_description')),
|
||||
Textarea::make('intro')
|
||||
->label(__('admin.fields.intro'))
|
||||
->rows(5)
|
||||
->columnSpanFull()
|
||||
->helperText(__('admin.helpers.category_intro')),
|
||||
TextInput::make('keywords')
|
||||
->label(__('admin.fields.keywords')),
|
||||
TextInput::make('cover_path')
|
||||
->label(__('admin.fields.cover_path'))
|
||||
->helperText(__('admin.helpers.category_cover')),
|
||||
TextInput::make('display_order')
|
||||
->label(__('admin.fields.display_order'))
|
||||
->required()
|
||||
->numeric()
|
||||
->default(0),
|
||||
TextInput::make('articles_count')
|
||||
->label(__('admin.fields.articles_count'))
|
||||
->required()
|
||||
->numeric()
|
||||
->default(0),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Categories\Tables;
|
||||
|
||||
use App\Filament\Resources\Articles\ArticleResource;
|
||||
use App\Filament\Support\AdminTable;
|
||||
use App\Models\Category;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
@@ -16,9 +19,11 @@ class CategoriesTable
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')
|
||||
->label(__('admin.fields.name'))
|
||||
->searchable(),
|
||||
AdminTable::ellipsis(
|
||||
TextColumn::make('name')
|
||||
->label(__('admin.fields.name'))
|
||||
->searchable(),
|
||||
),
|
||||
TextColumn::make('display_order')
|
||||
->label(__('admin.fields.display_order'))
|
||||
->numeric()
|
||||
@@ -26,7 +31,17 @@ class CategoriesTable
|
||||
TextColumn::make('articles_count')
|
||||
->label(__('admin.fields.articles_count'))
|
||||
->numeric()
|
||||
->sortable(),
|
||||
->sortable()
|
||||
->url(fn (Category $record): string => ArticleResource::getUrl('index', [
|
||||
'filters' => [
|
||||
'category_id' => ['value' => $record->id],
|
||||
],
|
||||
])),
|
||||
AdminTable::ellipsis(
|
||||
TextColumn::make('description')
|
||||
->label(__('admin.fields.description'))
|
||||
->toggleable(),
|
||||
),
|
||||
TextColumn::make('created_at')
|
||||
->label(__('admin.fields.created_at'))
|
||||
->dateTime()
|
||||
|
||||
Reference in New Issue
Block a user