ROLES
Welcome to Rizrv ! To get characters you need to make a GET call to the following url :
GET ALL ROLES WITH PERMISSION
GEThttps://apis.rizrv.in/api/rolesParameter
Field | Type |
---|---|
name |
String |
description |
String |
permissions |
array |
Use LARAVEL cURL
$token = "USER_AUTH_TOKEN";
$ch = curl_init();
$header = array();
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json';
$header[] = 'Authorization: Bearer '. $token;
curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/roles");
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
$response = json_decode($server_output, true);
if ($response) { ... } else { ... }
{
"status": 200,
"message": "Success",
"roles": [
{
"id": 2,
"name": "User",
"slug": "user",
"description": null,
"created_at": "2023-08-03T12:13:30.000000Z",
"updated_at": "2023-08-10T06:37:02.000000Z",
"deleted_at": null,
"permission_role": [
{
"id": 84,
"permission_id": 19,
"role_id": 2,
"created_at": "2023-08-11T09:05:18.000000Z",
"updated_at": "2023-08-11T09:05:18.000000Z",
"deleted_at": null,
"permission": {
"id": 19,
"name": "add",
"slug": "add-franchises",
"description": null,
"model": "Franchises",
"created_at": "2023-08-11T07:59:12.000000Z",
"updated_at": "2023-08-11T07:59:12.000000Z",
"deleted_at": null
}
},
]
},
]
}