Merge pull request #20 from mohasin-dev/master

Fix some Formatting convention  and Capitalization in README file
pull/23/head
Hasin Hayder 2 years ago committed by GitHub
commit 6f270ecb08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,7 +58,7 @@ Then follow the process using either Docker or without Docker (simple).
### Without Docker (Simple)
1. install the dependencies
1. Install the dependencies
```shell
composer install
@ -86,7 +86,7 @@ That's mostly it! You have a fully running laravel installation with Sanctum, al
### Using Docker & Laravel Sail
1. install the dependencies
1. Install the dependencies
```shell
docker run --rm \
@ -133,7 +133,7 @@ touch database/hydra.sqlite
Or simply create a new file as **hydra.sqlite** inside your **database** folder.
2. you can run both migrations and seeders together by simply running the following command
2. You can run both migrations and seeders together by simply running the following command
```shell
php artisan migrate:fresh --seed
@ -338,10 +338,10 @@ For any unsuccessful attempt or wrong token, you will receive a 401 error respon
### Update a User (User/Admin Ability Required)
Make an `HTTP PUT` request to the following route to update an existing user. Replace {userid} with actual user id. You must include a Bearer token obtained from User/Admin authentication. A bearer admin token can update any user. A bearer user token can only update the authenticated user by this token.
Make an `HTTP PUT` request to the following route to update an existing user. Replace {userId} with actual user id. You must include a Bearer token obtained from User/Admin authentication. A bearer admin token can update any user. A bearer user token can only update the authenticated user by this token.
```shell
http://localhost:8000/api/users/{userid}
http://localhost:8000/api/users/{userId}
```
For example, to update the user with id 3, use this endpoint `http://localhost:8000/api/users/3`
@ -396,10 +396,10 @@ For any unsuccessful attempt with an invalid `user id`, you will receive a 404 n
### Delete a User (Admin Ability Required)
To delete an existing user, make a `HTTP DELETE` request to the following route. Replace {userid} with actual user id
To delete an existing user, make a `HTTP DELETE` request to the following route. Replace {userId} with actual user id
```shell
http://localhost:8000/api/users/{userid}
http://localhost:8000/api/users/{userId}
```
For example to delete the user with id 2, use this endpoint `http://localhost:8000/api/users/2`
@ -543,7 +543,7 @@ For any unsuccessful attempt or wrong token, you will receive a 401 error respon
To update a role, make an `HTTP PUT` or `HTTP PATCH` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call.
```shell
http://localhost:8000/api/roles/{roleid}
http://localhost:8000/api/roles/{roleId}
```
For example to update the Customer role, use this endpoint `http://localhost:8000/api/roles/3`
@ -584,7 +584,7 @@ For any unsuccessful attempt or wrong token, you will receive a 401 error respon
To delete a role, make an `HTTP DELETE` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call.
```shell
http://localhost:8000/api/roles/{roleid}
http://localhost:8000/api/roles/{roleId}
```
For example, to delete the Customer role, use this endpoint `http://localhost:8000/api/roles/3`
@ -623,10 +623,10 @@ For any unsuccessful attempt or wrong token, you will receive a 401 error respon
### List Available Roles of a User (Admin Ability Required)
To list all available roles for a user, make an `HTTP GET` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call. Replace {userid} with an actual user id
To list all available roles for a user, make an `HTTP GET` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call. Replace {userId} with an actual user id
```shell
http://localhost:8000/api/users/{userid}/roles
http://localhost:8000/api/users/{userId}/roles
```
For example to get all roles assigned to the user with id 2, use this endpoint `http://localhost:8000/api/users/2/roles`
@ -667,10 +667,10 @@ For any unsuccessful attempt or wrong token, you will receive a 401 error respon
### Assign a Role to a User (Admin Ability Required)
To assign a role to a user, make an `HTTP POST` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call. Replace {userid} with an actual user id
To assign a role to a user, make an `HTTP POST` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call. Replace {userId} with an actual user id
```shell
http://localhost:8000/api/users/{userid}/roles
http://localhost:8000/api/users/{userId}/roles
```
For example to assign a role to the user with id 2, use this endpoint `http://localhost:8000/api/users/2/roles`
@ -721,10 +721,10 @@ For any unsuccessful attempt or wrong token, you will receive a 401 error respon
### Delete a Role from a User (Admin Ability Required)
To delete a role from a user, make an `HTTP DELETE` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call. Replace `{userid}` with an actual user id, and `{role}` with an actual role id
To delete a role from a user, make an `HTTP DELETE` request to the following route, with Admin Token obtained from Admin Login. Add this token as a standard `Bearer Token` to your API call. Replace `{userId}` with an actual user id, and `{role}` with an actual role id
```shell
http://localhost:8000/api/users/{userid}/roles/{role}
http://localhost:8000/api/users/{userId}/roles/{role}
```
For example, to delete a role with id 3 from the user with id 2, use this endpoint `http://localhost:8000/api/users/2/roles/3`

Loading…
Cancel
Save