---
title: Aaron Francis is putting PHP in Your JS Files
url: "https://aaronfrancis.com/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7"
path: "/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7"
type: podcast_episode
author: Aaron Francis
published: 2025-03-05
description: "Wes and Scott talk with Aaron Francis about Fusion for Laravel, a new way to seamlessly integrate PHP into JavaScript. They discuss how Fusion expands on Inertia, its potential for React support, and how it simplifies full-stack development..."
keywords: [fusion for laravel, php in javascript, laravel, inertia, vue, react server components, single file components, javascript frameworks, full-stack development, postgres, sqlite, database scaling]
show: Syntax.fm
chunked: true
full_bytes: 60111
section_count: 15
full_url: "/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/full.md"
site_index: "/llms.txt"
keyword_index: "/llms/keywords.txt"
---

# Aaron Francis is putting PHP in Your JS Files

## Show Notes

Wes and Scott talk with Aaron Francis about Fusion for Laravel, a new way to seamlessly integrate PHP into JavaScript. They discuss how Fusion expands on Inertia, its potential for React support, and how it simplifies full-stack development.

🔥 Be the ~14,700th person to join our super tasty newsletter bit.ly/syntax_snackpack

All links available at https://syntax.fm/882 ------------------------------------------------------------------------------ Hit us up on Socials! Syntax: https://x.com/syntaxfm Scott: https://x.com/stolinski Wes: https://x.com/wesbos CJ: https://x.com/CodingGarden Randy: https://www.youtube.com/@randyrektor

http://www.syntax.fm

Brought to you by Sentry.io

#webdevelopment #webdeveloper #javascript #syntax #syntaxfm #webdev

## Sections (58.7 KB full document — follow any link to read verbatim)

This page is long enough to hit agent truncation cliffs if fetched all at once. Pick the section matching your question below to read it 100% verbatim (< 35 KB each), or open the [full unsplit document (58.7 KB)](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/full.md).

### 1. Welcome to Syntax! (00:00–01:22 · 1.6 KB)
Wes and Scott introduce Aaron Francis and his project Fusion for Laravel, which enables writing PHP directly in JavaScript files.
Keywords: `javascript`, `syntax`, `tryhard studios`, `bos`, `put php`, `php inside`, `laravel developer`, `php`
[Read section 1 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/1-welcome-to-syntax.md)

### 2. Aaron's background in PHP (01:23–02:38 · 1.2 KB)
Aaron's journey from ASP.NET to raw PHP, then through frameworks Yii, CakePHP, and finally Laravel 5.1+, chosen for his work at TryHard Studios.
Keywords: `php`, `background`, `laravel`, `picked`, `yee`, `bos`, `loud`, `wow`
[Read section 2 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/2-aarons-background-in-php.md)

### 3. What is Fusion for Laravel? (02:38–09:21 · 7.2 KB)
Fusion builds on Inertia to let developers write PHP and Vue together in single-file components, enabling reactive state and behavior exposure without separate API endpoints.
Keywords: `javascript`, `fusion`, `laravel`, `single file`, `file component`, `bos`, `file`, `component`
[Read section 3 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/3-what-is-fusion-for-laravel.md)

### 4. How Fusion works (09:22–13:56 · 4.7 KB)
Fusion uses a Vite plugin to extract PHP blocks from Vue components at build time, writing them to disk as Laravel classes, enabling state sharing and RPC-style function calls between frontend and backend.
Keywords: `fusion`, `fusion works`, `works`, `view component`, `php`, `php class`, `component`, `data`
[Read section 4 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/4-how-fusion-works.md)

### 5. The benefits of Laravel (13:57–19:17 · 5.6 KB)
Fusion leverages full Laravel lifecycle (middleware, routing, auth) while keeping Vue's power, offering JavaScript developers an on-ramp to Laravel without sacrificing frontend capabilities.
Keywords: `laravel`, `javascript`, `benefits`, `component`, `view`, `fusion`, `bos`, `javascript community`
[Read section 5 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/5-the-benefits-of-laravel.md)

### 6. Invalidation and caching (19:18–25:20 · 6.5 KB)
Fusion supports granular cache control via selective state sync and Laravel backend caching, allowing developers to refresh specific data without full refetches or implement fine-grained invalidation strategies.
Keywords: `caching`, `invalidation`, `bos`, `method`, `refresh`, `query`, `syntax`, `sync`
[Read section 6 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/6-invalidation-and-caching.md)

### 7. Brought to you by Sentry.io (25:20–26:02 · 0.7 KB)
Sponsor segment promoting Sentry.io error tracking for production applications to ensure visibility into failures.
Keywords: `sentry`, `brought`, `sentry.io`, `optimistic ui`, `ui`, `application`, `syntax`, `optimistic`
[Read section 7 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/7-brought-to-you-by-sentryio.md)

### 8. Optimistic UI (26:02–28:52 · 3.1 KB)
Fusion exposes backend functions as reactive proxies with loading states, allowing developers to wrap them with custom optimistic UI logic using decorators rather than inferring updates automatically.
Keywords: `optimistic ui`, `javascript`, `optimistic`, `ui`, `function`, `called favorite`, `favorite`, `function called`
[Read section 8 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/8-optimistic-ui.md)

### 9. React integration? (28:53–32:17 · 3.6 KB)
React support is planned for Fusion, with Aaron exploring syntax options (tagged template literals or other patterns) that won't repel React developers accustomed to separate files.
Keywords: `react`, `react integration`, `integration`, `single file`, `template literal`, `file component`, `php`, `bos`
[Read section 9 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/9-react-integration.md)

### 10. Fusion's original name (and the naming process) (32:17–33:55 · 1.9 KB)
Fusion was originally named Duo, inspired by an earlier package called Solo, but Josh Siri suggested Fusion as a better fit to avoid naming collision with Google products.
Keywords: `fusion`, `fusion original`, `original name`, `naming process`, `original`, `naming`, `process`, `duo`
[Read section 10 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/10-fusions-original-name-and-the-naming-process.md)

### 11. Laravel's approach to frontend frameworks (33:55–37:57 · 4.4 KB)
Taylor Otwell pragmatically supports multiple frontend frameworks (React, Vue, Inertia) while praising HTMX and LiveWire as capable alternatives that shouldn't require full SPAs by default.
Keywords: `javascript`, `laravel`, `frameworks`, `laravel approach`, `frontend frameworks`, `frontend`, `end frameworks`, `react`
[Read section 11 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/11-laravels-approach-to-frontend-frameworks.md)

### 12. Databases and scaling (37:57–41:52 · 3.9 KB)
Aaron discusses SQLite's underutilization in web apps despite ubiquity, compares PostgreSQL's extensibility and high provider count versus MySQL's operational simplicity, noting only PlanetScale successfully scaled MySQL.
Keywords: `sqlite`, `mysql`, `databases`, `scaling`, `postgres`, `database`, `seen`, `think sqlite`
[Read section 12 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/12-databases-and-scaling.md)

### 13. Postgres extensibility and hosting options (41:52–48:09 · 7.0 KB)
PostGIS for geospatial data and vector search plugins exemplify Postgres extensibility, with ClickHouse emerging for high-volume analytics via Laravel's upcoming Nightwatch APM tool led by Jess Archer.
Keywords: `postgres`, `mysql`, `crunchy data`, `hosting`, `postgres extensibility`, `hosting options`, `extensibility`, `postgis`
[Read section 13 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/13-postgres-extensibility-and-hosting-options.md)

### 14. The vision for Fusion (48:09–48:55 · 0.8 KB)
Fusion aims to lower entry barriers for JavaScript developers joining the Laravel community by providing familiar APIs and patterns that make Laravel feel homey to frontend engineers.
Keywords: `javascript`, `vision`, `fusion`, `javascript developer`, `laravel`, `community`, `stupid`, `smart`
[Read section 14 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/14-the-vision-for-fusion.md)

### 15. Sick Picks + Shameless Plugs (48:56–53:59 · 5.9 KB)
Aaron's sick pick is Better Display CLI for controlling monitor brightness and resolution via scripts, handy for video recording and stream deck integration; Scott shares his experience securing custom domains.
Keywords: `shameless plugs`, `sick picks`, `sick`, `shameless`, `picks`, `plugs`, `bos`, `better display`
[Read section 15 verbatim](/podcast/aaron-francis-is-putting-php-in-your-js-files-6f3117a7/sections/15-sick-picks-shameless-plugs.md)

---

## Related on aaronfrancis.com

- [Aaron Francis: Building and Teaching Cool Things](/podcast/aaron-francis-building-and-teaching-cool-things-39697cbb) *(Podcast · 2025-03-11 · shared: tryhard studios, inertia, laravel)*
- [Fusion: Write PHP inside your Vue and React components](/podcast/fusion-write-php-inside-your-vue-and-react-components-cdf3a9e4) *(Podcast · 2025-02-14 · shared: laravel, vue, react server components)*
- [#33 - Aaron Francis on Fusion, TUIs and Content Creation](/podcast/33-aaron-francis-on-fusion-tuis-and-content-creation-087d6b18) *(Podcast · 2025-02-13 · shared: inertia, laravel, tryhard studios)*
- [Teaching Databases, Writing PHP, and Independent Work with Aaron Francis](/podcast/teaching-databases-writing-php-and-independent-work-with-aaron-francis-a22e6b07) *(Podcast · 2024-08-27 · shared: sqlite, mysql, postgres)*
- [Why Most Developers Overcomplicate Everything w/ Aaron Francis](/podcast/why-most-developers-overcomplicate-everything-w-aaron-francis-855db0fe) *(Podcast · 2025-03-20 · shared: laravel, tryhard studios, sqlite)*

## Relevant Resources from Aaron Francis

- **[Solo](https://soloterm.com)** (overview on site: [/software](/software)): All-in-one agentic development platform and terminal workspace built by Aaron Francis for orchestrating processes and AI coding agents.
- **[MySQL for Developers](https://databaseschool.com)** (overview on site: [/courses](/courses)): Full video course covering MySQL indexing, deferred joins, pagination, query plans, and schema design for application developers.

## Search aaronfrancis.com (2-Hop Static Keyword Index)

Pick the alphabetical shard matching any topic to find exact pages across all articles, newsletters, videos, talks, and podcast transcripts (every shard is < 40 KB):
[A-B](/llms/keywords/a-b.txt) · [C](/llms/keywords/c.txt) · [D-E](/llms/keywords/d-e.txt) · [F-G](/llms/keywords/f-g.txt) · [H-J](/llms/keywords/h-j.txt) · [K-L](/llms/keywords/k-l.txt) · [M-N](/llms/keywords/m-n.txt) · [O-P](/llms/keywords/o-p.txt) · [Q-R](/llms/keywords/q-r.txt) · [S](/llms/keywords/s.txt) · [T-Z](/llms/keywords/t-z.txt) · [Directory](/llms/keywords.txt) · [Site Map](/llms.txt)

Shards for this page's topics: `fusion for laravel` ([F-G](/llms/keywords/f-g.txt)), `php in javascript` ([O-P](/llms/keywords/o-p.txt)), `laravel` ([K-L](/llms/keywords/k-l.txt)), `inertia` ([H-J](/llms/keywords/h-j.txt)).

## About Aaron Francis (Current Context)

Aaron Francis is VP of Marketing and Community at [Laravel](https://laravel.com), founder of [Try Hard Studios](https://tryhardstudios.com), creator of [Solo](https://soloterm.com), co-host of [Mostly Technical](/podcast), and author of [Mastering Postgres](/courses), [High Performance SQLite](/courses), [MySQL for Developers](/courses), and [Screencasting.com](/courses). Full bio: [/about](/about) · Current focus: [/now](/now).
