CCelestiallines.com

From the blog

Notes on PHP, Drupal, Laravel, React, and Next.js development.

Laravel Eloquent Relationships Explained

Jun 2026

Laravel Eloquent Relationships Explained

A practical walkthrough of every Laravel Eloquent relationship type — one-to-one, one-to-many, many-to-many, polymorphic (including polymorphic many-to-many), and hasManyThrough — plus constraining/counting relationships, default models, and the N+1 trap to avoid.

Read more →
How to Set Up a Multilingual Drupal Site

Jun 2026

How to Set Up a Multilingual Drupal Site

Setting up multilingual Drupal correctly: the four core modules and what each actually handles, language detection methods and why URL-based detection matters for SEO, making content types and individual fields translatable, the language switcher block, and automatic hreflang tags.

Read more →
How to Build a Custom React Hook (Step-by-Step Guide)

Jun 2026

How to Build a Custom React Hook (Step-by-Step Guide)

Building custom React hooks properly: what actually qualifies as a hook, extracting real duplicated logic (an online-status hook and a debounced-value hook as worked examples), the rules of hooks that still apply inside your own hooks, and when extraction is premature.

Read more →
Next.js Server Actions: Complete Guide with Examples

Jun 2026

Next.js Server Actions: Complete Guide with Examples

Next.js Server Actions in depth: defining them with 'use server', using them directly as a form's action (works without client JS), revalidating the cache after a mutation, pending/error state with useFormStatus and useActionState, calling actions outside forms, and why they need their own server-side authorization checks.

Read more →
PHP vs Node.js: Which Should You Choose in 2026?

Jun 2026

PHP vs Node.js: Which Should You Choose in 2026?

PHP vs Node.js compared honestly: execution model differences (shared-nothing vs event loop), where each still wins in 2026, performance realities versus benchmark hype, and a practical decision framework rather than a popularity verdict.

Read more →
Laravel Authentication: Breeze vs Sanctum vs Passport

Jun 2026

Laravel Authentication: Breeze vs Sanctum vs Passport

Breeze vs Sanctum vs Passport in Laravel, chosen by the problem each actually solves — session auth for server-rendered/Inertia apps, token auth for your own SPA/mobile clients, and full OAuth2 only when a genuine third party needs delegated access.

Read more →