Sharing Global Page Data in InertiaJS with Laravel
Configure InertiaJS shared data once in Laravel middleware and read it client-side with usePage().props.shared. Avoid secrets, heavy models, and client mutations.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Configure InertiaJS shared data once in Laravel middleware and read it client-side with usePage().props.shared. Avoid secrets, heavy models, and client mutations.
Stop fighting YAML files. Learn how to use Symfony's autowiring and service tagging to build scalable, decoupled architectures with minimal configuration.
PHP 8.1 backed enums replace magic strings with type-safe domain values that still serialize to primitives for databases and APIs.
When PHP apps start up, Composer’s default autoloader can add latency. The <code>--optimize-autoloader</code> flag pre‑builds a classmap, cutting file lookups and speeding the first request. Learn how it works, when to use it, and how to verify the gains.
Learn how to implement Argon2id in PHP using password_hash to secure user credentials against database leaks and brute-force attacks.
A practical pattern for Laminas MVC: use laminas-form InputFilters as the single source of validation truth and laminas-hydrator to map filtered data into DTOs, keeping controllers focused on orchestration.
Learn how PHP 8.1+ readonly properties and PHP 8.2+ readonly classes enforce immutability in value objects and DTOs. See a concrete UserId example, trade-offs, and a quick adoption checklist.
Decide how Composer should generate the autoloader for production: default, --optimize-autoloader, or --classmap-authoritative. Compare build time, runtime latency, and memory, then see a concrete CI setup and validation steps.
Learn how to configure Xdebug step debugging in PhpStorm for PHP web and CLI scripts, including php.ini settings, IDE configuration, breakpoint handling, verification steps, and recovery tips.