From b7f4cbd548ffab543d762972f94536a6a8de40cf Mon Sep 17 00:00:00 2001 From: Hamid Musavi Date: Sun, 29 Aug 2021 16:50:51 +0430 Subject: [PATCH] Update Doctumentation --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 57608b2..2b3c834 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,16 @@ php artisan migrate --- ## Usage +Add HasPermission to your user model +```php +use MirHamit\ACL\HasPermissions; +class User extends Authenticatable +{ + use HasApiTokens, HasFactory, Notifiable, HasPermissions; +... +} +``` + You can add multiple roles in `roles` table and permissions in `permissions` table and bind permission to role in `permission_role` table You can use middleware: