Skip to content

Commit 642445c

Browse files
author
Philipp Kübler
committed
Merge branch 'release/2.1.1'
2 parents ab3fe2a + c4e4dce commit 642445c

File tree

3 files changed

+7891
-25
lines changed

3 files changed

+7891
-25
lines changed

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
reviewers:
8+
- PKuebler
9+
- krns
10+
assignees:
11+
- PKuebler

README.md

+12-25
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Manage user permissions and roles in your Laravel application by domain driven r
88

99
* [Installation](#installation)
1010
* [Usage](#usage)
11-
* [Usign roles](#using-roles)
12-
* [Usign permissions](#using-permissions)
11+
* [Using roles](#using-roles)
12+
* [Using permissions](#using-permissions)
1313
* [Using Blade directives](#using-blade-directives)
1414
* [Config](#config)
1515

@@ -21,7 +21,7 @@ $user->assignRole('admin');
2121
$user->hasRole('admin'); // true
2222
```
2323

24-
You can define roles and permissions by code at `config/permission.php`.
24+
Define roles and permissions in `config/permission.php`.
2525

2626
```php
2727
'role' => [
@@ -38,7 +38,7 @@ You can define roles and permissions by code at `config/permission.php`.
3838
]
3939
```
4040

41-
You can check permissions by
41+
Check permissions by
4242

4343
```php
4444
$admin->hasPermission('news/delete'); // true
@@ -52,20 +52,6 @@ $user->hasPermission('news/delete'); // false
5252
composer require sourceboat/laravel-static-permission
5353
```
5454

55-
Older than Laravel 5.5 need a service provider registration.
56-
57-
```php
58-
// config/app.php
59-
60-
'providers' => [
61-
Sourceboat\Permission\PermissionServiceProvider::class,
62-
];
63-
```
64-
65-
```php
66-
php artisan vendor:publish
67-
```
68-
6955
## Usage
7056

7157
### Add trait to model
@@ -76,7 +62,7 @@ php artisan vendor:publish
7662

7763
### Using roles
7864

79-
You can define the roles in the `config/permission.php` file.
65+
Define roles in `config/permission.php`.
8066

8167
```php
8268
// config/permission.php
@@ -96,7 +82,7 @@ $model->assignRole('admin');
9682

9783
#### Check role
9884

99-
You can check the role via:
85+
Check role via:
10086

10187
```php
10288
$model->hasRole('admin');
@@ -106,7 +92,7 @@ $model->getRoleName(); // return admin
10692

10793
### Using permissions
10894

109-
Permissions are based on the MQTT syntax. Permissions are specified as path. Thus, individual security levels can be mapped and generally released via wildcards.
95+
Permissions are based on the MQTT syntax and specified as path. Thus, individual security levels can be mapped and generally released via wildcards.
11096

11197
#### Check permissions
11298

@@ -132,7 +118,7 @@ $model->hasAnyPermission(['users/show', 'users/edit']);
132118
- `#` Wildcard for everything following
133119
- `!` Before the permission - prohibits permission
134120

135-
You can define the role permissions in the `config/permission.php` file.
121+
Define roles and permissions in `config/permission.php`.
136122

137123
```php
138124
// config/permission.php
@@ -150,7 +136,7 @@ You can define the role permissions in the `config/permission.php` file.
150136

151137
### Using Blade directives
152138

153-
You can use Blade directives in your views.
139+
Use Blade directives in your views.
154140

155141
#### Role
156142

@@ -174,7 +160,7 @@ You can use Blade directives in your views.
174160
@endpermission
175161
```
176162

177-
You can use several permissions too.
163+
Use several permissions.
178164

179165
```blade
180166
@permission('user/edit|user/create')
@@ -189,6 +175,7 @@ You can use several permissions too.
189175
```
190176

191177
#### Middleware
178+
192179
Add the middleware to your `src/Http/Kernel.php`
193180
```php
194181
use Sourceboat\Permission\Middlewares\RoleMiddleware;
@@ -252,7 +239,7 @@ composer test
252239

253240
## Changelog
254241

255-
Please see [CHANGELOG](CHANGELOG.md) for details.
242+
See [releases](https://github.com/sourceboat/laravel-static-permission/releases) for details.
256243

257244
## Contributing
258245

0 commit comments

Comments
 (0)