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:
@@ -124,6 +124,22 @@ use Filament\Infolists\Components\TextEntry;
|
|||||||
use Filament\Infolists\Components\IconEntry;
|
use Filament\Infolists\Components\IconEntry;
|
||||||
use Filament\Infolists\Components\ImageEntry;
|
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!):**
|
#### **Filament 4.x TAB KULLANIM KURALLARI (KRİTİK!):**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user