emtiazzahid/laravel-quiz-system

/pub/quiz?page=1&limit=20 404 (Not Found)

Closed this issue · 9 comments

Hi,
I think you have the wrong base URL.

if you are running that API with VueJS App then you might need to create a .env file by cp .env.example .env and put the Laravel API project URL into it.

Hi, I think you have the wrong base URL.

if you are running that API with VueJS App then you might need to create a .env file by cp .env.example .env and put the Laravel API project URL into it.

I install laravel-quiz-system.
How install you frontend ?

api .env:
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:********
APP_DEBUG=true
APP_URL=http://localhost:8080

LOG_CHANNEL=daily
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=quiz
DB_USERNAME=root
DB_PASSWORD=root

DB_TEST_DATABASE=quiz

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

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

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

JWT_SECRET=********Cf5plJ8jgIekB4ETa

SCOUT_DRIVER='"null"'
SCOUT_QUEUE=true
ALGOLIA_APP_ID=
ALGOLIA_SECRET=

quiz .env:
VUE_APP_API_URL=http://localhost:8080/api

api folder
image

quiz folder
image

if you run php artisan serve in API it will serve in 8000 port by default. same for APP, if you run npm run serve it should run at 8080 port.
so in quiz APP .env it will be VUE_APP_API_URL=http://localhost:8000/api and in API APP_URL=http://localhost:8000/

php artisan serve

frontend (quiz folder) don`t have artisan

i run API - php artisan serve
run QUIZ - npm run serve

get error:
http://localhost:8000/api/pub/quiz?page=1&limit=20 500 (Internal Server Error)

sorry, it all worked) thanks