feat: add ApiResponse trait for standardized API responses

chore: update composer dependencies to include phppresentation

chore: update composer.lock after adding phppresentation

feat: create categories migration for category management

feat: create templates migration for template storage

feat: create template generations migration for tracking template usage

feat: create template keys migration for template customization

feat: create notifications migration for user notifications

feat: update API routes for categories, templates, and user profile management

docs: update API documentation to include new endpoints for profile and wallet
This commit is contained in:
2026-07-07 01:03:12 +03:30
parent cf0e6f82fd
commit ae974c2afa
68 changed files with 3594 additions and 100 deletions

View File

@@ -0,0 +1,66 @@
<?php
namespace App\Filament\Resources\Templates;
use App\Filament\Resources\Templates\Pages\CreateTemplate;
use App\Filament\Resources\Templates\Pages\EditTemplate;
use App\Filament\Resources\Templates\Pages\ListTemplates;
use App\Filament\Resources\Templates\Pages\ViewTemplate;
use App\Filament\Resources\Templates\RelationManagers\GenerationsRelationManager;
use App\Filament\Resources\Templates\RelationManagers\KeysRelationManager;
use App\Filament\Resources\Templates\Schemas\TemplateForm;
use App\Filament\Resources\Templates\Tables\TemplatesTable;
use App\Models\Template;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;
class TemplateResource extends Resource
{
protected static ?string $model = Template::class;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedPresentationChartBar;
protected static string|UnitEnum|null $navigationGroup = 'پاورپوینت‌ها';
protected static ?string $recordTitleAttribute = 'title';
protected static ?string $modelLabel = 'قالب';
protected static ?string $pluralModelLabel = 'قالب‌ها';
protected static ?string $navigationLabel = 'قالب‌ها';
protected static ?int $navigationSort = 21;
public static function form(Schema $schema): Schema
{
return TemplateForm::configure($schema);
}
public static function table(Table $table): Table
{
return TemplatesTable::configure($table);
}
public static function getRelations(): array
{
return [
KeysRelationManager::class,
GenerationsRelationManager::class,
];
}
public static function getPages(): array
{
return [
'index' => ListTemplates::route('/'),
'create' => CreateTemplate::route('/create'),
'view' => ViewTemplate::route('/{record}'),
'edit' => EditTemplate::route('/{record}/edit'),
];
}
}