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
  • Наука та технологія

КОМЕНТАРІ • 102

  • @JacquesvanWyk
    @JacquesvanWyk 11 місяців тому +1

    wow what a great surprise. Nice to see your videos up again

  • @MuetzeOfficial
    @MuetzeOfficial 11 місяців тому +2

    With NativePHP a little dream of me comes true. Thank You for the video.

  • @ahmadalmabhoh4785
    @ahmadalmabhoh4785 11 місяців тому

    Andre, awesome. ❤❤

  • @AMoktar
    @AMoktar 11 місяців тому

    Amazing 🎉 thanks

  • @jhoanborges6574
    @jhoanborges6574 6 місяців тому

    You're my master!!!

  • @RakibulIslam-rj2yw
    @RakibulIslam-rj2yw 11 місяців тому

    Andre, very good explanation, thanks. I will appreciate another video regarding how to package and publish this app to distribute to end users.

    • @drehimself
      @drehimself  11 місяців тому

      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.

  • @question-du-temps
    @question-du-temps 11 місяців тому

    Thanks !

  • @Oprekode
    @Oprekode 11 місяців тому

    nice tutorial

  • @vinsmokesanji9485
    @vinsmokesanji9485 11 місяців тому

    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 ....

  • @moneyisenergy
    @moneyisenergy 11 місяців тому +5

    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

    • @drehimself
      @drehimself  11 місяців тому +8

      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.

  • @FujimaruR
    @FujimaruR 11 місяців тому +1

    wow that's good news,,
    finnaly have an alternative beside electron

  • @eunardayangco2987
    @eunardayangco2987 11 місяців тому

    Good Day. May I know if this is consumes lot of memory usage as well like ElectronJS?

  • @eclipse4049
    @eclipse4049 5 місяців тому

    Hey andre, thanks for that great video. I want to ask, is NativePHP can scan and read all file in local directory client?

  • @HamadAbdulla_7
    @HamadAbdulla_7 11 місяців тому

    thanks

  • @s.joseph406
    @s.joseph406 11 місяців тому

    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 ?

  • @Stoney_Eagle
    @Stoney_Eagle 11 місяців тому

    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 😊

    • @w3hacker
      @w3hacker 11 місяців тому

      Why not use electron?

    • @nightlifeking
      @nightlifeking 2 місяці тому

      It works for Windows now.

    • @Stoney_Eagle
      @Stoney_Eagle 2 місяці тому

      @@nightlifeking a build still doesn't run properly, at least dev now starts without tinkering.

  • @lucasnascimento1036
    @lucasnascimento1036 Місяць тому

    Excellent video, can you tell me if it works normally without internet on the computer??

  • @alimosbah
    @alimosbah 11 місяців тому

    There is something missing in the documentation of nativePHP , a mechanism or a way to build an application after completing its design

  • @paulholsters7932
    @paulholsters7932 2 місяці тому

    any idea when it will be in bèta? Love this product!!

  • @yacinehamiane8203
    @yacinehamiane8203 7 місяців тому

    can I use nativePHP on windows? or only on linux and macos?

  • @sword6012
    @sword6012 11 місяців тому

    Great!!
    What is the name of your VSCode theme?

  • @fradanloparv
    @fradanloparv 11 місяців тому

    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.

    • @drehimself
      @drehimself  11 місяців тому +2

      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!

  • @rhejiearanez9951
    @rhejiearanez9951 11 місяців тому

    Nice Andre, but is possible to work with Vuejs?

    • @drehimself
      @drehimself  11 місяців тому +1

      Yeah should work fine with Inertia + Vue.

  • @easyvideott7505
    @easyvideott7505 11 місяців тому

    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?

    • @drehimself
      @drehimself  11 місяців тому +1

      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.

  • @JuriBinturong
    @JuriBinturong 11 місяців тому

    I like laravel, vue, and nuxt.

  • @Bright-Great
    @Bright-Great 9 днів тому

    can you do a video on how to make it an executable file and package it with database?

  • @ObviouslyProgrammer
    @ObviouslyProgrammer 11 місяців тому

    Nice! What is that VSCode template?

  • @yoskokleng3658
    @yoskokleng3658 3 місяці тому

    Now NativePHP is currently still an alpha

  • @afzaalhussain3620
    @afzaalhussain3620 11 місяців тому

    can we create widow app?

  • @alimosbah
    @alimosbah 11 місяців тому +1

    Is tauri supported or only electron js ?

    • @drehimself
      @drehimself  11 місяців тому +1

      Only electron for now... But Tauri support should be coming soon

    • @alimosbah
      @alimosbah 11 місяців тому

      @@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.💯💯💯💯

  • @MrDragos360
    @MrDragos360 11 місяців тому +1

    What's the advantaje of nativephp over using vue3 with electron ?

    • @rutgerhoutdijk3547
      @rutgerhoutdijk3547 11 місяців тому +4

      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.

    • @aarkgaming-ur4ex
      @aarkgaming-ur4ex 11 місяців тому

      @@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.

    • @maelstrom57
      @maelstrom57 11 місяців тому

      ​@@rutgerhoutdijk3547 There's infinitely more things you can do with JS than with PHP.

  • @s.joseph406
    @s.joseph406 11 місяців тому

    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

  • @toufiqulislam8575
    @toufiqulislam8575 11 місяців тому

    Is it expected that mobile apps can be made with PHP in the near future?

    • @drehimself
      @drehimself  11 місяців тому +1

      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.

  • @duongvankhai726
    @duongvankhai726 11 місяців тому

    Can we develop an app with nativePHP ?

  • @0O0day
    @0O0day 11 місяців тому

    Can you make a simple tutorial with Vue please. Thanks

  • @ninjabuzz
    @ninjabuzz 11 місяців тому +1

    Man this is amazing ,now what is left native mobile app with laravel

    • @ninjabuzz
      @ninjabuzz 11 місяців тому

      @Andre I know this is out of the box question but what do you prefer AWS or digitalocean for laravel deployment

  • @Bevallalom
    @Bevallalom 11 місяців тому

    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...

    • @drehimself
      @drehimself  11 місяців тому

      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`

    • @resin01
      @resin01 11 місяців тому

      As the page says, it isnt production ready. So I dont think there is a command to compile it to an executable yet

    • @Bevallalom
      @Bevallalom 11 місяців тому

      @resin01 yes, I know. Probably that is something they need to include... we will see. The project looks promising. 👌

    • @resin01
      @resin01 11 місяців тому +1

      @@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)

  • @0O0day
    @0O0day 11 місяців тому

    Is it possible to use vue js? Thanks

    • @drehimself
      @drehimself  11 місяців тому +3

      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.

    • @0O0day
      @0O0day 11 місяців тому

      @@drehimself Thank you

    • @yoskokleng3658
      @yoskokleng3658 11 місяців тому

      @@drehimself wow, now i love Inertia vue laravel native. 😍😍 but sir how about hosting it?

  • @djhyll1
    @djhyll1 9 місяців тому

    Excellent, but the menu, the menubar in Linux does not work let's hope it works soon

  • @principe.borodin
    @principe.borodin 11 місяців тому

    How to build it?

  • @AbdulRehman-pz4rr
    @AbdulRehman-pz4rr 10 місяців тому

    Can you setup on ubuntu? make tutorial for ubuntu linux

  • @bahrambayramli4343
    @bahrambayramli4343 11 місяців тому

    NODEJS❤

  • @constantine9074
    @constantine9074 11 місяців тому

    Whaaaaat? I😮😮😮

  • @Conten619
    @Conten619 11 місяців тому

    are this can developmen in windows

  • @TomisaburoRMizugawa
    @TomisaburoRMizugawa 11 місяців тому

    So, it's Mac / Linux only? Would be useful to mention right at the beginning that Windows users need not apply ...

    • @drehimself
      @drehimself  11 місяців тому +1

      It looks like Windows is supported now (with some bugs). Check out: github.com/NativePHP/laravel/issues/96

  • @israeliloba
    @israeliloba 11 місяців тому

    With this I'm so confused now, I have already moved to python for desktop development

    • @aarkgaming-ur4ex
      @aarkgaming-ur4ex 11 місяців тому

      PHP is great for DB compatibility but limited range of what you can build with it unlike python.

  • @DEBUGENTITY
    @DEBUGENTITY 11 місяців тому

    If PHP can make cross platform mobile apps..

  • @MikeNugget
    @MikeNugget 11 місяців тому

    I thought this video would be about Tauri

  • @bahrambayramli4343
    @bahrambayramli4343 11 місяців тому

    ELECTRONJS

  • @JulioMunoz-ty6dx
    @JulioMunoz-ty6dx 11 місяців тому

    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

  • @uanaocomchocapphatchetluon4759
    @uanaocomchocapphatchetluon4759 11 місяців тому

    i hope someone build a framework for game apps with php 😅😅

    • @drehimself
      @drehimself  11 місяців тому +1

      Haha... that would blow my mind.

  • @z-root8955
    @z-root8955 11 місяців тому

    This will have space and resources problems
    For example a 100MB app that takes a screenshot

    • @drehimself
      @drehimself  11 місяців тому

      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.

  • @JACKoPL
    @JACKoPL 11 місяців тому

    Windows missing? ;)

  • @aArcziMetin2
    @aArcziMetin2 11 місяців тому

    Its basically a webview

  • @techEdunsights
    @techEdunsights 9 місяців тому

    How i can make .exe

  • @savire.ergheiz
    @savire.ergheiz 11 місяців тому +12

    So native means running html UI on native OS now 😂

    • @rutgerhoutdijk3547
      @rutgerhoutdijk3547 11 місяців тому +6

      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..

    • @thebirdhasbeencharged
      @thebirdhasbeencharged 11 місяців тому +1

      React Native, Electron?

    • @sur2548
      @sur2548 11 місяців тому

      😂

  • @greendsnow
    @greendsnow 11 місяців тому

    why?!

  • @leedoped6795
    @leedoped6795 11 місяців тому

    naivephp?

  • @knives1212121
    @knives1212121 11 місяців тому +1

    why did they name it nativephp? it will be confusing for a job interview lol

    • @drehimself
      @drehimself  11 місяців тому

      Naming things is hard 😅

    • @ilhamprabuzakys
      @ilhamprabuzakys 9 місяців тому

      they should change it to smth like "Laravel Desktop"?

  • @atlantic_love
    @atlantic_love 9 місяців тому +1

    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.

  • @mindtaker299
    @mindtaker299 11 місяців тому

    cute.
    php is becoming powerful