
James Whitaker
PHP, Ruby and ecommerce checkout for sthan.io
James writes the PHP and Ruby track: verifying and parsing US addresses in Laravel and Ruby on Rails, and adding address autocomplete to a Laravel checkout form.
Each article ends in a controller you can drop into an app, and maps the answer onto your models: Eloquent columns in Laravel, ActiveRecord attributes in Rails.
- 5 articles
- 50 minutes of reading
- PHP 8.1+ and Laravel 10+
- Latest: Jun 27, 2026
What James covers
Pick the job and the framework. Every filled cell is one article.
| Job | PHP / Laravel | Ruby on Rails |
|---|---|---|
| Check an address is deliverable | Verify in PHP / Laravel Laravel Http client, a controller that accepts, warns or blocks | Verify in Ruby on Rails Net::HTTP client and a controller action |
| Split an address into fields | Parse in PHP / Laravel components mapped to Eloquent columns | Parse in Ruby on Rails components mapped to ActiveRecord attributes |
| Suggest addresses as people type | Autocomplete in PHP / Laravel controller proxy and a debounced input | No article yet |
Where to start
A reading order for a PHP or Rails developer.
-
Verify in your stack 10 minLaravel or Rails: check the address when the form is submitted.
-
Parse in your stack 10 minStore each part of the address in its own column.
-
Help people type the address right the first time.
Questions these articles answer
Each question links to the answer inside the article.
Getting started
- How do I verify a US address in PHP? Verify in PHP / Laravel
- How do I verify a US address in Ruby on Rails? Verify in Ruby on Rails
- How do I parse a US address in PHP / Laravel? Parse in PHP / Laravel
- How do I parse a US address in Ruby on Rails? Parse in Ruby on Rails
- How do I add address autocomplete in PHP / Laravel? Autocomplete in PHP / Laravel
Reading the answer
- What is the difference between Confirmed, ConfirmedPrimaryOnly, NotDeliverable, and Unknown? Verify in PHP / Laravel
- Which match mode should I use for address verification? Verify in PHP / Laravel
- Does the API return the apartment or unit number separately? Verify in PHP / Laravel
- What components does the address parser return? Parse in PHP / Laravel
- What is the difference between parsing and verifying an address? Parse in PHP / Laravel
Building it
- Should I call the API from the browser or the server? Verify in PHP / Laravel
- How do I authenticate the address autocomplete API in PHP? Autocomplete in PHP / Laravel
- What is the response time for autocomplete requests? Autocomplete in PHP / Laravel
- How much does the address verification API cost? Verify in PHP / Laravel
What the code assumes
- PHP
- PHP 8.1 or newer, Laravel 10 or newer, the Laravel Http client
- Ruby
- Ruby 3.0+ for verification and 2.7+ for parsing, with Net::HTTP
- Your key
- Called from your controller, never from the browser
Related on sthan.io
Terms explained
All articles by James
How to Add Address Autocomplete in PHP / Laravel
Add US address autocomplete to your Laravel app. Free API, a server-side controller proxy, the Http client, and a debounced front-end input.
How to Verify US Addresses in PHP / Laravel
Confirm deliverability at submit. Free API, the Laravel Http client, and a controller that branches on DPV - accept, warn, or block.
How to Verify US Addresses in Ruby on Rails
Confirm deliverability at submit. Free API, a Net::HTTP client, and a Rails controller action that branches on DPV - accept, warn, or block.
How to Parse US Addresses in PHP / Laravel
Split freeform addresses into structured components. Free API, the Laravel Http client, components mapped to Eloquent columns.
How to Parse US Addresses in Ruby on Rails
Split freeform addresses into structured components. Free API, a Net::HTTP client, components mapped to ActiveRecord attributes.