setup docker
first run migrations
php artisan migrate
two run seeder database
php artisan db:seed --class="DatabaseSeeder"
Then run command for run laravel app:
php artisan serve
Note: please for set config api sms going to .env file
report of all sms
report of sms by phone number
login
register
refresh token
redis :
I using of Cache::remember() because this method will cache mysql query for 10 min And if item wasn’t in redis cache first will add to redis And then items cached show to user and is optimize and short code
Login Page:
Login
method : get
http://127.0.0.1:8000/login
Report Page:
Report page
method : post,get
http://127.0.0.1:8000/report
Send SMS to phoneNumber:
send sms to phoneNumber
header : Authorization Bearer eyJ0eXAiOiJK. .
input : phoneNumber , body
method : post
http://127.0.0.1:8000/api/send-sms
APIs Report All SMS:
Report All SMS
header : Authorization Bearer eyJ0eXAiOiJK...
input : nothing...
method : get
http://127.0.0.1:8000/api/report-all-sms
Get Report of messages by phone number:
get report of messages by phone number
header : Authorization Bearer eyJ0eXAiOiJK. .
input : phoneNumber
method : post
http://127.0.0.1:8000/api/report-sms-by-number
Login:
Login with email and password and get jwt token
input : email,password
method : post
http://127.0.0.1:8000/api/auth/login
Register
Register user with name,email,password
input : name,email,password
method : post
http://127.0.0.1:8000/api/register
Refresh token
Refresh token
method : post
http://127.0.0.1:8000/api/auth/refresh
Logout token
Logout token
method : post
http://127.0.0.1:8000/api/auth/logout
Pictures of Test App