From 253a4e23becc70cdebee678d8127fcd1b7774e9b Mon Sep 17 00:00:00 2001 From: Hasin Hayder Date: Sun, 29 May 2022 20:19:41 +0600 Subject: [PATCH] Readme Updated --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1d91ef1..be70b63 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,18 @@ 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. Run migration +```shell +php artisan migrate:fresh --seed +``` + +**OR** + + +you can run them separately using the following commands + +2. Run Migrations ```shell php artisan migrate:fresh @@ -95,7 +105,7 @@ php artisan migrate:fresh Now your database has essential tables for user and roles management. -3. Database Seeding +3. Run Database Seeders Run `db:seed`, and you have your first admin user, some essential roles in the roles table, and the relationship correctly setup. @@ -103,12 +113,6 @@ Run `db:seed`, and you have your first admin user, some essential roles in the r php artisan db:seed ``` -or you can simply run migrations and seeders together by running the following command - -```shell -php artisan migrate:fresh --seed -``` - Please note that the default admin user is **admin@hydra.project** and the default password is **hydra**. You should create a new admin user before deploying to production and delete this default admin user. You can do that using the available Hydra user management API or any DB management tool. ## List of Default Routes @@ -864,14 +868,14 @@ Change it like this Route::get('greet', [MessageController::class,'greet'])->middleware(['auth:sanctum', 'ability:admin']); ``` -Only an `HTTP GET` call with a valid admin user's access token can access this route. -If you want this route to be accessible by the users with `admin`, **or** the `user` role, then modify it. +Only an `HTTP GET` call with a valid admin user's access token can access this route. +If you want this route to be accessible by the users with `admin`, **OR** the `user` role, then modify it. ```php Route::get('greet', [MessageController::class,'greet'])->middleware(['auth:sanctum', 'ability:admin,user']); ``` -If you want this route to be accessible by the users with both `user`, **and** the `customer` role, then modify it. +If you want this route to be accessible by the users with both `user`, **AND** the `customer` role, then modify it. ```php Route::get('greet', [MessageController::class,'greet'])->middleware(['auth:sanctum', 'abilities:customer,user']);