Skip to content

Commit 8248d8a

Browse files
committed
update README file
1 parent c19beec commit 8248d8a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,23 @@ In Laravel 5.5 the service provider will automatically get registered. In older
8181
];
8282
```
8383

84+
You can publish [the migration](database/migrations/create_permission_collections.php.stub) with:
85+
86+
```bash
87+
php artisan vendor:publish --provider="Maklad\Permission\PermissionServiceProvider" --tag="migrations"
88+
```
89+
90+
```bash
91+
php artisan migrate
92+
```
93+
8494
You can publish the config file with:
8595

8696
```bash
8797
php artisan vendor:publish --provider="Maklad\Permission\PermissionServiceProvider" --tag="config"
8898
```
8999

90-
When published, the [`config/permission.php`](https://github.com/mostafamaklad/laravel-permission-mongodb/blob/master/config/permission.php) config file contains:
100+
When published, the [`config/permission.php`](config/permission.php) config file contains:
91101

92102
```php
93103
return [
@@ -175,6 +185,7 @@ Copy the required files:
175185

176186
```bash
177187
cp vendor/mostafamaklad/laravel-permission-mongodb/config/permission.php config/permission.php
188+
cp vendor/mostafamaklad/laravel-permission-mongodb/database/migrations/create_permission_collections.php.stub database/migrations/2018_01_01_000000_create_permission_collections.php
178189
```
179190

180191
You will also need to create another configuration file at `config/auth.php`. Get it on the Laravel repository or just run the following command:
@@ -200,6 +211,12 @@ $app->configure('permission');
200211
$app->register(Maklad\Permission\PermissionServiceProvider::class);
201212
```
202213

214+
Now, run your migrations:
215+
216+
```bash
217+
php artisan migrate
218+
```
219+
203220
## Usage
204221

205222
First, add the `Maklad\Permission\Traits\HasRoles` trait to your `User` model(s):

0 commit comments

Comments
 (0)