- Spatie\Permission\Models\Permission 확장 - tenant() belongsTo 관계 추가 - tenant_id fillable 추가 - API 권한 시스템에서 사용 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
364 B
PHP
20 lines
364 B
PHP
<?php
|
|
|
|
namespace App\Models\Permissions;
|
|
|
|
use App\Models\Tenants\Tenant;
|
|
use Spatie\Permission\Models\Permission as SpatiePermission;
|
|
|
|
class Permission extends SpatiePermission
|
|
{
|
|
protected $fillable = [
|
|
'tenant_id',
|
|
'name',
|
|
'guard_name',
|
|
];
|
|
|
|
public function tenant()
|
|
{
|
|
return $this->belongsTo(Tenant::class);
|
|
}
|
|
} |