0

In a typical laravel project i use localhost:8000 to connect to my backend. How can i connect to the backend when using phpdesktop? Given that the port keeps changing with every launch.

I tried localhost:8000

Noela
  • 17
  • 2
  • By default phpdesktop generates a random web server port. You can change it to a fixed port by editing settings.json file (or access the port via $_SERVER): https://github.com/cztomczak/phpdesktop/wiki/Settings#listen_on – Czarek Tomczak May 18 '19 at 13:46

1 Answers1

0

make sure you are not running anything on that port. but if the issue persists, you can always run this command, feel free to change the port to your most preferred choice

php artisan serve --port=8080
Alcantara
  • 120
  • 7
  • Done that and now I get cors problem. I have installed Barryvdh/laravel-cors as described on the read me in the github depository. Also enabled the headers in my index.php file. I get "No Access-Control-Allow-Origin' header is present on the requested resource" – Noela May 18 '19 at 06:24
  • now i get a status code 200 ok for my requests but all my get, posts requests are changed to options. Here is my response headers "Allow:GET, POST, HEAD, CONNECT, PUT, DELETE, OPTIONS, PROPFIND, MKCOL DAV:1 ". – Noela May 18 '19 at 13:24