Introducing NativePHP: Build Native Desktop Apps with Laravel

Have you ever wondered if it's possible to build native desktop applications using the same skills and tools you already know from Laravel and PHP?

Well, with NativePHP, you can.

In this first article of our blog series, we’re diving into what NativePHP is, why it’s exciting, and how it empowers Laravel developers to build desktop apps without learning new languages like C++, Swift, or even Electron/Node.js.


🚀 What is NativePHP?

NativePHP is an open-source project that allows PHP developers to build native desktop applications using Laravel as the backend and Electron as the frontend shell. It acts as a bridge between your Laravel app and the user's desktop environment.

With NativePHP, you can:

  • Open native windows

  • Show system notifications

  • Access the file system

  • Handle tray menus, clipboard actions, global hotkeys, and more

All of this—without writing a single line of JavaScript (unless you want to).


🧠 Why NativePHP?

Here’s why NativePHP is such a game changer:

  • No new language required: If you know PHP and Laravel, you’re already halfway there.

  • Cross-platform: Build once and run on Windows, macOS, and Linux.

  • Tight Laravel integration: You can use routes, controllers, Eloquent models, Blade templates, Artisan commands, and everything Laravel offers—on the desktop.

  • Use familiar tooling: Keep using Composer, Laravel Mix, and PHPStorm/VSCode like you always do.

  • Ideal for internal tools, productivity apps, and offline-first software.


🏗️ How Does NativePHP Work?

Under the hood, NativePHP wraps your Laravel app in Electron (which is used in apps like VSCode, Discord, and Slack). It acts as the bridge between the Electron shell and your Laravel backend.

The workflow looks something like this:

  1. Laravel handles routing, business logic, data, and rendering views.

  2. Electron serves as the window manager and renders your Laravel views (or Vue/React frontend).

  3. NativePHP exposes APIs for native features (like notifications, dialogs, file system access, etc.).

So, your desktop app is just a Laravel app—with a few special powers.


🔧 Installing NativePHP

Getting started is surprisingly simple. Once your Laravel app is ready:

composer require nativephp/electron
php artisan native:install
php artisan native:serve

This will boot up your Laravel app in a native desktop window, just like any traditional application.


📦 What Can You Build With NativePHP?

  • ✅ A desktop-based invoicing app

  • ✅ An offline-first note-taking tool

  • ✅ Internal tools like CRMs or admin panels

  • ✅ A native file uploader/downloader with system integrations

  • ✅ Your own productivity apps like to-do lists, screenshot tools, etc.


🌍 Who is NativePHP For?

If you:

  • Are a Laravel/PHP developer

  • Want to create desktop apps without switching to C#, Swift, or Electron/JS

  • Need native system access (files, notifications, clipboard)

  • Love the Laravel ecosystem

Then NativePHP is definitely for you.


🔗 Resources


💬 Have questions or want us to cover something specific? Drop a comment below.