1

I am new here and I tried to start a project offline. From the beginning I have the same problem. I have a local domain (syworkx.local). I have line in hosts (in windows directory), I have line in httpd-vhosts.conf with info where is exactly the servis. I have also info in .env what is the app_dir.

The homepage is works ok but after successfully login I have a wrong route. I see the syworkx.local/dashboard but from wrong directory.

I have the same if I put localhost or syworkx.local in chrome. I have many projects in my xampp.

What exactly I have to change to start the project? I would like to explain that online everything is works good.

Please somebody help me. I know it is a small detail but my project doesn't work.

Thanks for help.

7
  • Can you add xampp PHP path to environment variable? Commented Jul 31, 2019 at 10:12
  • Check how to add PHP path to environment variable: stackoverflow.com/questions/10753024/… Commented Jul 31, 2019 at 10:14
  • Could you explain it to me? What exactly I have to do? Commented Jul 31, 2019 at 10:15
  • If you are building small project or learning laravel you can use PHP command to serve laravel project. For your php command to work on cmd or powershell you need to add PHP path to environment variable. Commented Jul 31, 2019 at 10:18
  • 1
    Run command php -v to check if environment variable is properly set. If set correctly you'll see PHP version on cmd Commented Jul 31, 2019 at 10:20

1 Answer 1

1

Run the following command on laravel project folder

php -S localhost:3000 -t public
  • Assuming you didn't change laravel default code.
  • You can put any port instead of 3000. But if you put port 80/8000 you might see error.
  • Once the command successfully ran then check browser with localhost:3000

This should work

Sign up to request clarification or add additional context in comments.

31 Comments

Now, it works but I have to delete 's' from https. When I deleted 's' from https:localhost:3000 and I have only http:localhost:3000 my project WORK. Where can I change it in the laravel project?
You can set 'url' => 'http://youDomain.com' in config/app.php or you could use a middleware class Laravel 5 - redirect to HTTPS.
Could it be also like this? APP_URL=localhost:3000 You said me I have to open from your suggest.
Probably, yes. Try and let me know.
No, I have to delete 's'. All the time it want ssl.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.