Update cursor rules for data retrieval: Added critical notes on avoiding infinite loops with $get('data') usage and provided correct implementation examples using null-safe operator for improved data handling. This update enhances clarity and adherence to best practices in the codebase.

This commit is contained in:
Ümit Tunç
2025-11-01 17:45:46 -03:00
parent ca47484d65
commit 22cb542703
+16
View File
@@ -124,6 +124,22 @@ use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\ImageEntry;
```
Get $get('data') şeklinde kullanma sakın bu sonsuz döngüye sebep olur. Aşağıdaki kullanımlar yanlış onun yerine
```php
$existingData = $get('data') ?? [];
```
```php
$existingData = $get('data') ?? [];
```
```php
$existingData = $get('data') ?? [];
```
onun yerineşu şekilde kullanılır.
```php
$existingData = $state?->section_data ?? [];
```
#### **Filament 4.x TAB KULLANIM KURALLARI (KRİTİK!):**