DEV Community

Emma Ngo
Emma Ngo

Posted on • Originally published at Medium on

Native PHP: How to Start?

I’m a web developer, and the main language that I use is PHP. As you know, actually, more than 70–80 percent of the current website you can see is PHP.

Before NativePHP, there was a lot of technical help needed to build PHP into an application (example: PHP Desktop). One of the most famous PHP frameworks currently is Laravel, and in Laracon 2023 day 2 the event of Laravel, Marcel Pociot introduced us to NativePHP with the topic "Writing Desktop Apps with PHP.”

Actually, I tried it, and it was really easy. You just need 3 commands, and you will have an application based on a standard Laravel project. It looks like a package for Laravel, so don’t worry if you are a PHP player.

How do I start?

If you have run the project with Laravel before, I believe you only need to run three commands before you can work with nativePHP

Installation

composer require nativephp/electron

You can run your current Laravel project or create a new one.

Run the installer

php artisan native:install

With the two commands above, nativePHP was successfully set up.

The last thing is to run it.

php artisan native:serve

Then, you will get an application like this:

What is special?

nativePHP has 5 highlight features; you can read more here.

  • Window management
  • Menu management
  • File management
  • Database support (SQLite)
  • Native notifications

But the thing that impresses me is “Menu Bar

I really think that it gives me an application, not a web application anymore.

Menu bar label

Menu bar Context Menu

End.

This topic might be late because nativePHP was introduced in April 2023.

But I believe that not many people know about the interesting features of nativePHP.

As before, PHP has other technical support PHP to make an application like “PHP Desktop”.

There are a lot of opportunities for PHP developers like me to build our product from the ground up.

Let's try; I'm impressed by what you can do with your application!!

Have a nice day :))))

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay