From 22cb542703e97fe803898f8cce016b8f158d9d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Sat, 1 Nov 2025 17:45:46 -0300 Subject: [PATCH] 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. --- .cursorrules | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.cursorrules b/.cursorrules index 9393cb8..9f47435 100644 --- a/.cursorrules +++ b/.cursorrules @@ -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!):**