Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Emad_nour's avatar

Does laravel desktop api need another site to work or it (api) may work at the same desktop app domain

I have a laravel desktop app when i run it , it serves but doesnt get or send data , till i run php artisan serve ...... is it okay ? or there is away to make laravel desktop app work alone with mysql

0 likes
6 replies
automica's avatar

you'll need to have a server running to be able to access your app. More robust than running 'php artisan serve' would be to install apache or nginx locally and set it to start when you boot your desktop.

1 like
Emad_nour's avatar

@automica i use phpdesktop-chrome-57.0 , but i can connect database till i run the command "php artisan serve " . i tried sqlite but i fail ,too ..... i use sanctum api in my app

Emad_nour's avatar

this is my first laravel desktop app .. i want it to connect mysql without run php artisan serve

jlrdw's avatar

@Emad_nour also I do some only desktop apps, but still use laravel, php, mariadb, and apache or nginx.

No different than a developer environment just never pushed to web. You don't need any special software. However in my case it's not setup as client server.

If you do need such as that, MS Access or LibreOffice base is a great choice. I have programmed in both for clients. MS Access has VBA and LibreOffice Base has similar a basic programming language.

I wish Visual Foxpro was still in development, that used to be what I used for client server applications.

Just suggestions.

1 like
martinbean's avatar

@emad_nour Laravel is a web application framework. It’s meant to run on web servers.

Use the correct tool for the job. If you want to create a desktop application then you should use appropriate technology such as Electron, or something C-based for Windows/Linux/macOS.

2 likes
Emad_nour's avatar

@martinbean i use phpdesktop-chrome-57.0 , but i can connect database till i run the command "php artisan serve " . i tried sqlite but i fail ,too ..... i use sanctum api in my app

Please or to participate in this conversation.