We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getAllPermissions()
Role
1 parent 4807005 commit 1176b9fCopy full SHA for 1176b9f
āsrc/Models/Role.php
@@ -4,7 +4,6 @@
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
7
-use Illuminate\Support\Collection;
8
use Spatie\Permission\Contracts\Role as RoleContract;
9
use Spatie\Permission\Exceptions\GuardDoesNotMatch;
10
use Spatie\Permission\Exceptions\RoleAlreadyExists;
@@ -196,12 +195,4 @@ public function hasPermissionTo($permission): bool
196
195
197
return $this->permissions->contains($permission->getKeyName(), $permission->getKey());
198
}
199
-
200
- /**
201
- * Return all the permissions the model has, both directly and via roles.
202
- */
203
- public function getAllPermissions(): Collection
204
- {
205
- return $this->permissions->sort()->values();
206
- }
207
0 commit comments