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
57 lines
1.8 KiB
PHP
57 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Notifications;
|
|
|
|
use App\Filament\Resources\Notifications\Pages\CreateNotification;
|
|
use App\Filament\Resources\Notifications\Pages\EditNotification;
|
|
use App\Filament\Resources\Notifications\Pages\ListNotifications;
|
|
use App\Filament\Resources\Notifications\Pages\ViewNotification;
|
|
use App\Filament\Resources\Notifications\Schemas\NotificationForm;
|
|
use App\Filament\Resources\Notifications\Tables\NotificationsTable;
|
|
use App\Models\Notification;
|
|
use BackedEnum;
|
|
use Filament\Resources\Resource;
|
|
use Filament\Schemas\Schema;
|
|
use Filament\Support\Icons\Heroicon;
|
|
use Filament\Tables\Table;
|
|
use UnitEnum;
|
|
|
|
class NotificationResource extends Resource
|
|
{
|
|
protected static ?string $model = Notification::class;
|
|
|
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedBell;
|
|
|
|
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 = 30;
|
|
|
|
public static function form(Schema $schema): Schema
|
|
{
|
|
return NotificationForm::configure($schema);
|
|
}
|
|
|
|
public static function table(Table $table): Table
|
|
{
|
|
return NotificationsTable::configure($table);
|
|
}
|
|
|
|
public static function getPages(): array
|
|
{
|
|
return [
|
|
'index' => ListNotifications::route('/'),
|
|
'create' => CreateNotification::route('/create'),
|
|
'view' => ViewNotification::route('/{record}'),
|
|
'edit' => EditNotification::route('/{record}/edit'),
|
|
];
|
|
}
|
|
}
|