diff --git a/CHANGELOG.md b/CHANGELOG.md index 3158f9aa..61d74f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to `mateusjunges/laravel-acl` will be documented in this file. +## 1.8.1 +- Add `->unique()` for permission slugs (fix #109) ## 1.8.0 - Check for permissions using wildcard (fix [#77](https://github.com/jungessolutions/laravel-acl/issues/77)) diff --git a/src/database/migrations/2019_03_16_005237_create_permissions_table.php b/src/database/migrations/2019_03_16_005237_create_permissions_table.php index 7317d4ed..06703ddd 100644 --- a/src/database/migrations/2019_03_16_005237_create_permissions_table.php +++ b/src/database/migrations/2019_03_16_005237_create_permissions_table.php @@ -17,7 +17,7 @@ public function up() Schema::create($permissionsTable, function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name')->unique()->nullable(false); - $table->string('slug')->nullable(false); + $table->string('slug')->unique()->nullable(false); $table->text('description')->nullable(); $table->softDeletes(); $table->timestamps();