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:
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\TemplateGenerations;
|
||||
|
||||
use App\Filament\Resources\TemplateGenerations\Pages\ListTemplateGenerations;
|
||||
use App\Filament\Resources\TemplateGenerations\Pages\ViewTemplateGeneration;
|
||||
use App\Filament\Resources\TemplateGenerations\Tables\TemplateGenerationsTable;
|
||||
use App\Models\TemplateGeneration;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class TemplateGenerationResource extends Resource
|
||||
{
|
||||
protected static ?string $model = TemplateGeneration::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedDocumentArrowDown;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'پاورپوینتها';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'uuid';
|
||||
|
||||
protected static ?string $modelLabel = 'تولید';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'تولیدها';
|
||||
|
||||
protected static ?string $navigationLabel = 'تولیدها';
|
||||
|
||||
protected static ?int $navigationSort = 22;
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return TemplateGenerationsTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListTemplateGenerations::route('/'),
|
||||
'view' => ViewTemplateGeneration::route('/{record}'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function canCreate(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function canEdit($record): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function canDelete($record): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user