Skip to content

Instantly share code, notes, and snippets.

View tegos's full-sized avatar
🐼

Ivan Mykhavko tegos

🐼
View GitHub Profile
@tegos
tegos / ForbiddenFunctionTest.php
Created March 16, 2025 12:30
Detecting Forbidden Functions in Laravel with PHPUnit
<?php
declare(strict_types=1);
namespace Tests\Unit\Architecture;
use Illuminate\Support\Facades\App;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use RegexIterator;
@tegos
tegos / comparing-two-my-sql-queries-for-top-solution-authors.md
Created September 14, 2025 13:53
Comparing Two MySQL Queries for Top Solution Authors

Comparing Two MySQL Queries for Top Solution Authors

This summarizes two queries to get the top users by solutions count, their corrected forms, simulated execution plans, and recommendations. For this video: Laravel Performance: Careful with withCount() by Povilas Korop.

Query 1 – Subquery in SELECT

Corrected Query