Files
minicrm/app/Filament/Resources/Feedback/FeedbackResource.php
phuongtc 8c6b71cb8a
Some checks failed
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
Tests / PHP 8.5 (push) Has been cancelled
feat: add i18n support for Vietnamese and English
2026-05-04 10:40:39 +00:00

64 lines
1.7 KiB
PHP

<?php
namespace App\Filament\Resources\Feedback;
use App\Filament\Resources\Feedback\Pages\CreateFeedback;
use App\Filament\Resources\Feedback\Pages\EditFeedback;
use App\Filament\Resources\Feedback\Pages\ListFeedback;
use App\Filament\Resources\Feedback\RelationManagers\InteractionsRelationManager;
use App\Filament\Resources\Feedback\Schemas\FeedbackForm;
use App\Filament\Resources\Feedback\Tables\FeedbackTable;
use App\Models\Feedback;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
class FeedbackResource extends Resource
{
protected static ?string $model = Feedback::class;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedChatBubbleLeftRight;
protected static ?string $pluralLabel = 'app.resource_feedbacks';
protected static ?int $navigationSort = 1;
public static function getPluralLabel(): ?string
{
return __('app.resource_feedbacks');
}
public static function getNavigationGroup(): ?string
{
return __('app.nav_customer_care');
}
public static function form(Schema $schema): Schema
{
return FeedbackForm::configure($schema);
}
public static function table(Table $table): Table
{
return FeedbackTable::configure($table);
}
public static function getRelations(): array
{
return [
InteractionsRelationManager::class,
];
}
public static function getPages(): array
{
return [
'index' => ListFeedback::route('/'),
'create' => CreateFeedback::route('/create'),
'edit' => EditFeedback::route('/{record}/edit'),
];
}
}