Tutorials for Developers & Sysadmins

Step-by-step guides for the work we actually do — Laravel, PHP, WordPress, MySQL, Linux servers, and the occasional rabbit hole. Every command has been run on a real machine; nothing is theoretical.

Laravel Blade: Difference Between @foreach and @forelse

Laravel Blade's @foreach renders nothing on an empty collection; @forelse has an @empty branch for the no-items message. Includes $loop…

how7o

Laravel Database Transactions Explained (DB::transaction vs beginTransaction)

Group multiple DB writes into an atomic unit with Laravel's DB::transaction(closure) or DB::beginTransaction/commit/rollBack. Includes deadlock retry, lockForUpdate, when not to…

how7o

How Laravel’s old() Helper Works (and Why It Sometimes Doesn’t)

How Laravel's old() helper repopulates form inputs after validation, and why it returns nothing — missing withInput() on manual redirects.…

how7o

Securely Hash Passwords in PHP (password_hash, Argon2id)

Securely hash passwords in PHP with password_hash + PASSWORD_DEFAULT (bcrypt) or PASSWORD_ARGON2ID. Verify with password_verify, upgrade on login with password_needs_rehash.

how7o

What Does the -y Flag Do in yum / dnf / apt-get?

The -y flag in yum, dnf, and apt-get auto-answers yes to every prompt. Useful in scripts; skip it for first-time…

how7o

Fix “URL.createObjectURL is not a function” in Chrome Extension Service Workers

Fix 'URL.createObjectURL is not a function' in a Chrome extension Manifest V3 service worker by switching to FileReader.readAsDataURL for a…

how7o

Why CSS Page Breaks Don’t Work in HTML Tables (and How to Fix It)

Page breaks not working with HTML tables? page-break-* only works on block elements. Use break-inside: avoid on rows and split…

how7o

How to Fix DKIM Not Signing Emails in aaPanel

Fix aaPanel emails not being signed by DKIM — chmod 644 the /www/server/dkim/{domain}/default.private file and restart rspamd. Includes DNS publish…

how7o

Laravel Migration Column Types — Cheat Sheet

Cheat sheet of Laravel migration column types — id, string, integer, decimal, date/time, foreignId, morphs — with modifiers (nullable, default,…

how7o

How to Fix Laravel CSRF Token Mismatch in DataTables Ajax

Fix Laravel CSRF token mismatch in DataTables Ajax by sending the token as the X-CSRF-TOKEN header via beforeSend, or globally…

how7o