Laravel with xampp
I need to understand this behavior.
I am using xampp for web development. I start an apache server in the xampp gui and then I can run my projects in the browser via localhost ...
Since yesterday I have added laravel to my mac book. My project is in the xampp htdocs folder and I want to use the xampp. But when the xampp apache server instance started, nothing happened to my laravel project until I ran php artisan in CMD.
How can I combine larael with xampp? And what exactly does a php artisan do? Start another instance of Apache server?
source to share
The artisan command is just a command line utility for laravel. The serve command starts the PHP server.
to run it without wizards, you can set up a virtual server host (Apache or Nginx) that has your project's shared directory as the root directory. Since you are using a MAC, I cannot exactly instruct you on how to do this.
Note
this will help create a virtual host. but i have not tried this
source to share
Sorry I can't comment because of the reputation: / i use lumen (rest api laravel) with xampp and it works great. Can you provide more details? I also think the path is the problem. Which path do you use to access it through the browser? for lumen its / htdocs / project / public / so in the browser: http: // localhost / project / public / there I can access the api. should be similar for a complete laravel project?
source to share
Create a virtual host and point it to laravel_directory / public / index.php and restart apache.
Create apache virtual host: http://laravel-recipes.com/recipes/25/creating-an-apache-virtualhost
If you don't want to do this upload, localhost / lara_dir / public / index.php
index.php
is where all requests go.
source to share