From cdbb825fbe9ec530bd1aedcdfd21290b13e436b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sat, 21 Feb 2026 07:50:41 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[permission]=20Role::users()=20=EB=B0=98?= =?UTF-8?q?=ED=99=98=20=ED=83=80=EC=9E=85=20=EC=84=A0=EC=96=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Spatie Role::users(): BelongsToMany 시그니처와 호환되도록 수정 - FatalError: Declaration must be compatible 에러 해결 --- app/Models/Permissions/Role.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Permissions/Role.php b/app/Models/Permissions/Role.php index abd532f..fc85a49 100644 --- a/app/Models/Permissions/Role.php +++ b/app/Models/Permissions/Role.php @@ -8,6 +8,7 @@ use App\Models\Tenants\Tenant; use App\Traits\Auditable; use App\Traits\BelongsToTenant; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\SoftDeletes; use Spatie\Permission\Models\Role as SpatieRole; @@ -53,7 +54,7 @@ public function userRoles() /** * 관계: 사용자 (user_roles 테이블 통해) */ - public function users() + public function users(): BelongsToMany { return $this->belongsToMany( User::class,