feat(AI): add ai manager admin and create powerpoint with ai
This commit is contained in:
54
app/Filament/Resources/AiProviders/AiProviderResource.php
Normal file
54
app/Filament/Resources/AiProviders/AiProviderResource.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\AiProviders;
|
||||
|
||||
use App\Filament\Resources\AiProviders\Pages\CreateAiProvider;
|
||||
use App\Filament\Resources\AiProviders\Pages\EditAiProvider;
|
||||
use App\Filament\Resources\AiProviders\Pages\ListAiProviders;
|
||||
use App\Filament\Resources\AiProviders\Schemas\AiProviderForm;
|
||||
use App\Filament\Resources\AiProviders\Tables\AiProvidersTable;
|
||||
use App\Models\AiProvider;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class AiProviderResource extends Resource
|
||||
{
|
||||
protected static ?string $model = AiProvider::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedSparkles;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'هوش مصنوعی';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
protected static ?string $modelLabel = 'سرویس هوش مصنوعی';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'سرویسهای هوش مصنوعی';
|
||||
|
||||
protected static ?string $navigationLabel = 'سرویسهای AI';
|
||||
|
||||
protected static ?int $navigationSort = 30;
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return AiProviderForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return AiProvidersTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListAiProviders::route('/'),
|
||||
'create' => CreateAiProvider::route('/create'),
|
||||
'edit' => EditAiProvider::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user