Skip to content

Example of JSON API that demonstrates Laravel's job queues, database operations, migrations, and event handling.

Notifications You must be signed in to change notification settings

maksimgru/laravel-exam-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

Only First time:

to build images, up containers, init app, run queue worker

make run

OR step by step

Build Images, Run Containers:

make build
make up

Init App:

install vendors, run DB migrations

make init

Jobs Queue

By default, async handling of jobs QUEUE_CONNECTION=database

  • You should Run Queue Worker
make queue

If you need SYNC jobs handling

You need:

  • Change in .env file the variable to QUEUE_CONNECTION=sync
  • Dont need to run make queue

Now you can check endpoints

  • health check endpoint: GET http://localhost:8180/up
  • submit endpoint: POST http://localhost:8180/api/submit
  • see logs in app/storage/logs/laravel.log

Run, or stop, or down containers

make up
make stop
make down

connect to PHP container:

make bash

Run all tests:

make tests

Clear app cashes:

make cc

Clear log files:

make cl

Display docker containers statuses:

make ps

Available short commands in PHP container

  • alias for php artisan: pa
  • composer install: ci
  • composer update: cu
  • clear app cashes: clear
  • clear log files: cl
  • run tests: pu
  • run fresh DB (and clear app cache): fresh
  • run fresh on test DB: fresh-test

Screenshots

screenshots/screenshot-1.png screenshots/screenshot-2.png screenshots/screenshot-3.png

About

Example of JSON API that demonstrates Laravel's job queues, database operations, migrations, and event handling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published