you should always setup a virtualhost to point at app/public instead of going to http://localhost/app/public In this last way, your asset() and url() functions wont work well, the routing will probably also start seeing public as a route
The easiest way for testing the app locally is with "php artisan serve"
You're on mac right?
Another easy option is using laragon as your server setup (you can install it with either Apache or Nginx within a minute or 2)
@lostdreamer_nl thank for answer, but my question is how can i run as http://localhost/project/public/ and make it work like i run in virtual host or do "php artisan serve" or this can't happen anyway ?
because i need to put this project to AWS amazon ec2 but that connect to only http://localhost ,so this can happen or not?
You'd probably get more help from a) making your issue a bit clearer and b) I wouldn't have put it in site improvements, this section is for suggestions for laracasts.com, not improving YOUR site. I'm sure plenty of people are like me and only browse the sections that are applicable to them.
@blueshift9 sorry for that, My issue is when i access to localhost/project/public
the website functions wont work , so i need to know how can access to localhost/project/public and make functions work like i run on virtual host
so, this can happen or not ? thank sir for recommend.
You shouldn't access by ip in the url, access by the server name you gave it like your first screenshot. I assume you named the server in your vm internetcafe.oo? If so, just use that, and set APP_URL=http://internetcafe.oo/ in your .env if you haven't already.
When you move the site from your dev to a production server, you'd just update APP_URL=http://livesitename.com/ in .env on the production server.
@cronix I use laragon for virtual host , and that ip is public from production server .I assume my dns name from production server is http://mydns.com/ and i update APP_URL=http://mydns.com/ in .env right? and don't mess with virtual host internetcafe.oo right?