Skip to content

Commit 615f830

Browse files
JuragerJurager
Jurager
authored and
Jurager
committed
fix
1 parent c7b0772 commit 615f830

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

schema.png

-19.3 KB
Loading

src/Models/Group.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Illuminate\Database\Eloquent\Model;
77
use Illuminate\Database\Eloquent\Relations\BelongsTo;
88
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
9-
use Illuminate\Database\Eloquent\Relations\MorphMany;
9+
use Illuminate\Database\Eloquent\Relations\MorphToMany;
1010
use Jurager\Teams\Support\Facades\Teams;
1111

1212
class Group extends Model
@@ -55,9 +55,9 @@ public function users(): BelongsToMany
5555
/**
5656
* Get the permissions that belongs to group.
5757
*
58-
* @return morphToMany
58+
* @return MorphToMany
5959
*/
60-
public function permissions(): morphToMany
60+
public function permissions(): MorphToMany
6161
{
6262
return $this->morphToMany(Teams::model('ability'), 'entity', 'entity_permission');
6363
}

src/Models/Permission.php

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Jurager\Teams\Models;
44

55
use Illuminate\Database\Eloquent\Model;
6-
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
76
use Illuminate\Database\Eloquent\Relations\MorphToMany;
87
use Jurager\Teams\Support\Facades\Teams;
98

src/Models/Role.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
use Illuminate\Database\Eloquent\Model;
66
use Illuminate\Database\Eloquent\Relations\BelongsTo;
7-
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
8-
use Illuminate\Database\Eloquent\Relations\MorphMany;
7+
use Illuminate\Database\Eloquent\Relations\MorphToMany;
98
use Jurager\Teams\Support\Facades\Teams;
109

1110
class Role extends Model
@@ -62,9 +61,9 @@ public function team(): BelongsTo
6261
/**
6362
* Get the permissions that belongs to role.
6463
*
65-
* @return morphToMany
64+
* @return MorphToMany
6665
*/
67-
public function permissions(): morphToMany
66+
public function permissions(): MorphToMany
6867
{
6968
return $this->morphToMany(Teams::model('ability'), 'entity', 'entity_permission');
7069
}

0 commit comments

Comments
 (0)