Skip to content

Commit

Permalink
Updated docs and changed the seeder
Browse files Browse the repository at this point in the history
  • Loading branch information
santigarcor committed Feb 7, 2017
1 parent bce711b commit 7fac3a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions docs/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ In order to upgrade from Laratrust 3.0 to 3.1 you have to follow these steps:

2. Run ``composer update`` to update the source code.

3. Run ``php artisan laratrust:upgrade`` in order to create the migration with the database upgrade.
3. Add in your ``config/laratrust.php`` file this line::

4. Run ``php artisan migrate`` to run the migration created in the las step.
'permission_user_table' => 'permission_user',

5. If you use the ``savePermissions`` method in your code, change it to ``syncPermissions``.
4. Run ``php artisan laratrust:upgrade`` in order to create the migration with the database upgrade.

5. Run ``php artisan migrate`` to run the migration created in the las step.

6. If you use the ``savePermissions`` method in your code, change it to ``syncPermissions``.

Now you can use the 3.1 version without any problem.
2 changes: 1 addition & 1 deletion src/views/generators/seeder.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function run()
$permissionValue = $mapPermission->get($perm);

$permission = \{{ $permission }}::firstOrCreate([
'name' => $module . '-' . $permissionValue,
'name' => $permissionValue . '-' . $module,
'display_name' => ucfirst($permissionValue) . ' ' . ucfirst($module),
'description' => ucfirst($permissionValue) . ' ' . ucfirst($module),
]);
Expand Down

0 comments on commit 7fac3a7

Please sign in to comment.