Skip to content

Commit 71f3ed2

Browse files
committed
Persist last_good outside the cache and bundle a static Cloudflare IP fallback
1 parent aed766f commit 71f3ed2

42 files changed

Lines changed: 1070 additions & 274 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/laravel-best-practices/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Check sibling files, related controllers, models, or tests for established patte
9494
### 9. Queue & Job Patterns → `rules/queue-jobs.md`
9595

9696
- `retry_after` must exceed job `timeout`; use exponential backoff `[1, 5, 10]`
97-
- `ShouldBeUnique` to prevent duplicates; `WithoutOverlapping::untilProcessing()` for concurrency
97+
- `ShouldBeUnique` to prevent duplicates; `ShouldBeUniqueUntilProcessing` for early lock release
9898
- Always implement `failed()`; with `retryUntil()`, set `$tries = 0`
9999
- `RateLimited` middleware for external API calls; `Bus::batch()` for related jobs
100100
- Horizon for complex multi-queue scenarios
@@ -187,4 +187,4 @@ Always use a sub-agent to read rule files and explore this skill's content.
187187

188188
1. Identify the file type and select relevant sections (e.g., migration → §16, controller → §1, §3, §5, §6, §10)
189189
2. Check sibling files for existing patterns — follow those first per Consistency First
190-
3. Verify API syntax with `search-docs` for the installed Laravel version
190+
3. Verify API syntax with `search-docs` for the installed Laravel version

.claude/skills/laravel-best-practices/rules/advanced-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ public function scopeOrderByLastLogin($query): void
103103
->take(1)
104104
);
105105
}
106-
```
106+
```

.claude/skills/laravel-best-practices/rules/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $this->app->bind(PaymentGateway::class, StripeGateway::class);
8282

8383
## Default Sort by Descending
8484

85-
When no explicit order is specified, sort by `id` or `created_at` descending. Explicit ordering prevents cross-database inconsistencies between MySQL and Postgres.
85+
When no explicit order is specified, sort by `id` or `created_at` descending. Without an explicit `ORDER BY`, row order is undefined.
8686

8787
Incorrect:
8888
```php
@@ -199,4 +199,4 @@ class Customer extends Model
199199
return $this->belongsToMany(Role::class);
200200
}
201201
}
202-
```
202+
```

.claude/skills/laravel-best-practices/rules/blade-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ return view('dashboard', compact('users'))
3333

3434
## Use `@aware` for Deeply Nested Component Props
3535

36-
Avoids re-passing parent props through every level of nested components.
36+
Avoids re-passing parent props through every level of nested components.

.claude/skills/laravel-best-practices/rules/caching.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Use `Cache::remember()` Instead of Manual Get/Put
44

5-
Atomic pattern prevents race conditions and removes boilerplate.
5+
Cleaner cache-aside pattern that removes boilerplate. use `Cache::lock()` for race conditions.
66

77
Incorrect:
88
```php
@@ -67,4 +67,4 @@ If Redis goes down, the app falls back to a secondary store automatically.
6767

6868
```php
6969
'failover' => ['driver' => 'failover', 'stores' => ['redis', 'database']],
70-
```
70+
```

.claude/skills/laravel-best-practices/rules/collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ More declarative than overriding `newCollection()`.
4141
```php
4242
#[CollectedBy(UserCollection::class)]
4343
class User extends Model {}
44-
```
44+
```

.claude/skills/laravel-best-practices/rules/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## `env()` Only in Config Files
44

5-
Direct `env()` calls return `null` when config is cached.
5+
Direct `env()` calls may return `null` when config is cached.
66

77
Incorrect:
88
```php
@@ -70,4 +70,4 @@ If the application already uses language files for localization, use `__()` for
7070
```php
7171
// Only when lang files already exist in the project
7272
return back()->with('message', __('app.article_added'));
73-
```
73+
```

.claude/skills/laravel-best-practices/rules/db-performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ return view('users.index', compact('users'));
189189
@foreach ($users as $user)
190190
{{ $user->profile->name }}
191191
@endforeach
192-
```
192+
```

.claude/skills/laravel-best-practices/rules/eloquent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ Order::where('status', 'pending')->get();
145145

146146
Prefer Eloquent queries and relationships over `DB::table()` whenever possible — they already reference the model's table. When `DB::table()` or raw joins are unavoidable, always use `(new Model)->getTable()` to keep the reference traceable.
147147

148-
**Exception — migrations:** In migrations, hardcoded table names via `DB::table('settings')` are acceptable and preferred. Models change over time but migrations are frozen snapshots — referencing a model that is later renamed or deleted would break the migration.
148+
**Exception — migrations:** In migrations, hardcoded table names via `DB::table('settings')` are acceptable and preferred. Models change over time but migrations are frozen snapshots — referencing a model that is later renamed or deleted would break the migration.

.claude/skills/laravel-best-practices/rules/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ class InvalidOrderException extends Exception
6969
return ['order_id' => $this->orderId];
7070
}
7171
}
72-
```
72+
```

0 commit comments

Comments
 (0)