Authentication
Admin Users
Add admin users in /database/config.php
token will be auto generated
{
"admins": [
{
"username": "admin1",
"password": "admin1",
"token": ""
},
{
"username": "admin2",
"password": "admin2",
"token": ""
}
}Declare route for Authentication
Add /auth route in index.php
Make sure to import Auth Class
use Auth;
Get Admin User Token
POST -/auth
Request Body
Name
Type
Description
username
string
username of admin
password
string
password of admin
Last updated
Was this helpful?