NativePHP - Desktop Apps with Laravel
Вставка
- Опубліковано 10 лип 2024
- NativePHP is a framework for building native desktop applications using Laravel and the tools you're already familiar with. It has support for bundling your application with Electron with support for Tauri coming soon. In this video, we'll take a look at some of the basics of NativePHP and build an example desktop application that pulls data from the Reddit API.
NativePHP: nativephp.com/
Marcel's talk at Laracon: • Marcel Pociot "Native ...
GitHub Repo: github.com/drehimself/nativep...
0:00 - Intro and Show Demo App
1:16 - Installation and setup with Vite
7:05 - Opening New Window
11:37 - Native Notifications
13:57 - Application Menu
21:39 - Menu Bar
23:31 - Database was SQLite
27:39 - Settings - Light and Dark Theme
35:54 - Demo App Reddit API
LINKS
My courses: codewithdre.com
Sign up for my newsletter: andremadarang.com/newsletter
My website: andremadarang.com
Twitter: / drehimself
GitHub: github.com/drehimself
CodePen: codepen.io/drehimself - Наука та технологія
wow what a great surprise. Nice to see your videos up again
With NativePHP a little dream of me comes true. Thank You for the video.
Andre, awesome. ❤❤
Amazing 🎉 thanks
You're my master!!!
Andre, very good explanation, thanks. I will appreciate another video regarding how to package and publish this app to distribute to end users.
I wanted to show the packaging and publishing of the app but I wasn't sure how to do it myself. Hopefully the docs are updated soon.
Thanks !
nice tutorial
Hello
Thank u a lot for your tutorial
I just want to know if I can to minimize app to try icons or for example to set up app start when os start up etc ....
Andre, nice! Thanks to you I learned TailwindCSS which I love. I migrated from PHP to NodeJs/TS and never looked backand it was the best decision in my life. Do you plan to do any NodeJS maybe with the AdonisJS framework which is Laravel for NodeJs world? Keep it UP! :D
I have a few videos on Adonis from maybe 4 years ago but I plan to stick with Laravel-related content since it's what I mostly use and am familiar with.
wow that's good news,,
finnaly have an alternative beside electron
Good Day. May I know if this is consumes lot of memory usage as well like ElectronJS?
Hey andre, thanks for that great video. I want to ask, is NativePHP can scan and read all file in local directory client?
thanks
Great indeed, but i havent seen how tauri comes in here, i like the way tauri bundles its final .exe, do we have that power here? how does tauri play here and whats the bundle size of the final application ?
I am sooo exited for this!!!, It still doesn't work for windows yet so I have to be patient.
Been eagerly watching all activity on the repo since laracon 😊
Why not use electron?
It works for Windows now.
@@nightlifeking a build still doesn't run properly, at least dev now starts without tinkering.
Excellent video, can you tell me if it works normally without internet on the computer??
There is something missing in the documentation of nativePHP , a mechanism or a way to build an application after completing its design
any idea when it will be in bèta? Love this product!!
can I use nativePHP on windows? or only on linux and macos?
Great!!
What is the name of your VSCode theme?
Material theme
brilliant! You have explained it wonderfully!
Could you make a video showing how to publish the app? I have not been able to publish the demo and in theory I have all the requirements, it compiles and only shows the app in the dock, also, when I do it for windows it does not open either but it shows at least 3 processes of the same name, any ideas? Thanks in advance.
I'm not exactly sure what the process is for publishing the app. I tried myself, the build works but I don't know where to find the .dmg or .exe file. Hopefully, the docs are updated soon!
Nice Andre, but is possible to work with Vuejs?
Yeah should work fine with Inertia + Vue.
Can this tool be used with Linux? I mean can you develop an app on Ubuntu and then the final product to be *.AppImage file which can be used on Ubuntu?
Yes, a native app should be generated and available to install on all platforms via Electron (or eventually Tauri). It might be buggy right now, but I have seen some Linux/Ubuntu users in the GitHub issues.
I like laravel, vue, and nuxt.
can you do a video on how to make it an executable file and package it with database?
Nice! What is that VSCode template?
Material Theme
Now NativePHP is currently still an alpha
can we create widow app?
Is tauri supported or only electron js ?
Only electron for now... But Tauri support should be coming soon
@@drehimself It's great. I hope to support Tauri as soon as possible. The scales will change with Tauri. There will be opportunities for desktop application workers with web applications.💯💯💯💯
What's the advantaje of nativephp over using vue3 with electron ?
If you have an existing laravel app, you don't have to rewrite everything. Many people prefer PHP over JS. Also PHP is more powerful in many ways, with JS you still need some backend to do the complex stuff. And of course you can still use inertia+vue/livewire on the frontend.
@@rutgerhoutdijk3547 true, until now i am still confused why JS(FE/client-side) don't have built-in method for removing image background you still need 3rd-party library which sometimes doesn't work and PHP(BE/Server-side) has built-in method for it which works perfectly.
@@rutgerhoutdijk3547 There's infinitely more things you can do with JS than with PHP.
KIndly also talk about building a .exe file after building, portability , installation eg: securing exe with passwords and secretes ad finally auto updating using CI/CD. Thanks
Is it expected that mobile apps can be made with PHP in the near future?
If you watch the end of Marcel's talk, someone asked the same question. He said he had a proof of concept working but was unlikely to take it further.
Can we develop an app with nativePHP ?
Can you make a simple tutorial with Vue please. Thanks
Man this is amazing ,now what is left native mobile app with laravel
@Andre I know this is out of the box question but what do you prefer AWS or digitalocean for laravel deployment
It s still not clear how a user can install it, for example on Windows or Linux etc. User needs to run "php artisan native:serve" in CLI? How is it "native desktop application"? I went thru' the Doc but I dont get it...
There might be bugs still on Windows/Linux but generally it's just installing the composer package with `composer require nativephp/electron` and then running the installer with `php artisan native:install`. After that you can run the dev server with `php artisan native:serve`
As the page says, it isnt production ready. So I dont think there is a command to compile it to an executable yet
@resin01 yes, I know. Probably that is something they need to include... we will see. The project looks promising. 👌
@@BevallalomYeah. I assume it might take a bit as they need to figure out how to manage certificates. Each platform has their own requirements. Linux has none, mac needs a dev certificate I think, and windows needs a bought certificate (or none)
Is it possible to use vue js? Thanks
Yup, you can use Vue the same way you would use it in a traditional Laravel app. For example, using Inertia with Vue should work perfectly fine.
@@drehimself Thank you
@@drehimself wow, now i love Inertia vue laravel native. 😍😍 but sir how about hosting it?
Excellent, but the menu, the menubar in Linux does not work let's hope it works soon
How to build it?
Can you setup on ubuntu? make tutorial for ubuntu linux
NODEJS❤
Whaaaaat? I😮😮😮
are this can developmen in windows
No troll be need to a
So, it's Mac / Linux only? Would be useful to mention right at the beginning that Windows users need not apply ...
It looks like Windows is supported now (with some bugs). Check out: github.com/NativePHP/laravel/issues/96
With this I'm so confused now, I have already moved to python for desktop development
PHP is great for DB compatibility but limited range of what you can build with it unlike python.
If PHP can make cross platform mobile apps..
I thought this video would be about Tauri
ELECTRONJS
I have a problem, when I try to install it on windows it gives me this error message: a javascript error ocurred in the main process uncaught exception: error: spawn: x:\xampp\htdoc\morfyTPV\vendor
ativephp\electron
esources\js
esources\php\phpenoent at childprocess.?handke.onexit(nodeÑinternal/child?processÑ283Ñ19) at onerrornt(nodeÑinternal/child_process
i hope someone build a framework for game apps with php 😅😅
Haha... that would blow my mind.
This will have space and resources problems
For example a 100MB app that takes a screenshot
Yeah, electron apps are known for being huge but I honestly don't think it's too much of an issue with most modern desktops having large amounts of disk space available. Plus, support for Tauri should come eventually which should help as well.
Windows missing? ;)
Its basically a webview
How i can make .exe
So native means running html UI on native OS now 😂
In the end, it will produce machine code, it just needs a ton of abstraction layers to get there 😂
Anyway, you can sell it as an application, the end user doesn't care..
React Native, Electron?
😂
why?!
naivephp?
why did they name it nativephp? it will be confusing for a job interview lol
Naming things is hard 😅
they should change it to smth like "Laravel Desktop"?
Way, way too much configuration just to get a simple example running. True "native PHP" would be to install a PHP executable in a folder, and simply be able to run everything from there.
cute.
php is becoming powerful
nope it's not