This commit is contained in:
Mekan1206
2026-05-19 20:54:04 +05:00
parent 9870048a5f
commit 7841e28596
58 changed files with 3092 additions and 30 deletions

View File

@@ -0,0 +1,57 @@
<?php
namespace App\Filament\Resources\Coupons;
use App\Filament\Resources\Coupons\Pages\ListCoupons;
use App\Filament\Resources\Coupons\Pages\ViewCoupon;
use App\Filament\Resources\Coupons\Schemas\CouponInfolist;
use App\Filament\Resources\Coupons\Tables\CouponsTable;
use App\Models\Coupon;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
class CouponResource extends Resource
{
protected static ?string $model = Coupon::class;
protected static ?string $recordTitleAttribute = 'phone';
protected static ?string $navigationLabel = 'Coupons';
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedTicket;
protected static ?int $navigationSort = 1;
public static function infolist(Schema $schema): Schema
{
return CouponInfolist::configure($schema);
}
public static function table(Table $table): Table
{
return CouponsTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListCoupons::route('/'),
'view' => ViewCoupon::route('/{record}'),
];
}
public static function canCreate(): bool
{
return false;
}
}