Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

296
Views
Getting 400 error in Laravel for localhost server

This is my .env file. I am trying to run the Laravel project in the localhost server but I am getting 500 errors for my all assets and the is no error in the log file.

APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:1vaU3dfc+sWjx45ghgh46zginRsEa2dp2SBL+Ujs6QCb5c=
APP_DEBUG=true
APP_MODE=demo
APP_URL=http://127.0.0.1:8000

LOG_CHANNEL=single

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=6v_db
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379


MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

Still I am getting error of 400 for assets.enter image description here

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You need to exclude the 'public' folder from the url when loading these files via the web browser. Consider using the asset() method. https://laravel.com/docs/8.x/helpers#method-asset to generate the url.

Also make sure you have set the public folder rather than the base folder as the root at the web server level.

over 4 years ago · Santiago Trujillo Report

0

Make sure you have an assets folder under public folder and the required css and js files. As I see in your given image it says the assets not exist in the given path and giving you 404 Not Found Exception.

{{ asset('assets/front-end/js/theme.min.js') }}

You can call asset like above.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!