- Never use
finalclasses or private methods/properties - Write all code as though it belongs in an official first-party Laravel package. Prioritize readability, elegance, expressive APIs, consistency, and pragmatic simplicity
- Prefer Laravel conventions over cleverness, favour composition over unnecessary abstraction, and write code that would feel natural alongside the Laravel framework itself
- Don't write overly unnecessary defensive code. Prefer exceptions to be thrown organically vs catching all possibilities and handling each individually
- When explaining concepts and/or solutions to bugs, problems, or features, assume I have little or no prior knowledge of the topic unless I have demonstrated otherwise
- When producing GitHub issue/pull-request titles and descriptions, frame it from the point of view of a developer who knows nothing about the bug/feature/system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Jobs\Middleware; | |
| use Closure; | |
| use Illuminate\Contracts\Cache\Store; | |
| use Illuminate\Support\Facades\Cache; | |
| use Illuminate\Support\Facades\Date; | |
| use Illuminate\Support\InteractsWithTime; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "data": { | |
| "allCarriers": [ | |
| { | |
| "name": "1199SEIU", | |
| "id": "ic_440", | |
| "isHidden": false, | |
| "defaultPlanId": "ip_4005", | |
| "__typename": "InsuranceCarrier" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { defineConfig, loadEnv } from 'vite'; | |
| // ... | |
| export default defineConfig(({ mode }) => { | |
| const env = loadEnv(mode, process.cwd()); | |
| const { protocol, hostname } = new URL(env.VITE_URL); | |
| const root = hostname.split('.').slice(-2).join('\\.'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Support; | |
| use Illuminate\Notifications\RoutesNotifications; | |
| readonly class Guest | |
| { | |
| use RoutesNotifications; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -import axios from 'axios'; | |
| -import fs from 'fs'; | |
| -import path from 'path'; | |
| -import a from 'a'; | |
| -import somethingElse from '../somethingElse'; | |
| +import a from 'a'; | |
| +import fs from 'fs'; | |
| +import path from 'path'; | |
| +import axios from 'axios'; | |
| +import somethingElse from '../somethingElse'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Support; | |
| use DOMXPath; | |
| use DOMDocument; | |
| class SafeLinksReplacer | |
| { | |
| public static function replace(string $html): string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use Illuminate\Database\Migrations\Migration; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Database\SQLiteConnection; | |
| use Illuminate\Support\Facades\Schema; | |
| use Illuminate\Support\Facades\DB; | |
| return new class extends Migration | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "1.24.4", | |
| "modified": true, | |
| "page": { | |
| "editors": [ | |
| { | |
| "id": "4cd30d03-dc95-4a19-807e-7ca9551f28cb", | |
| "added": [], | |
| "removed": [], | |
| "focused": [], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Models; | |
| // ... | |
| use App\Enums\UserMediaCollection; | |
| class User extends Authenticatable | |
| { | |
| // ... |
NewerOlder