fix : _ide_helper.php 헬퍼 추가
- 개발 보조 기능
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
|
||||
namespace App\Models\Commons;
|
||||
|
||||
use App\Models\Members\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Traits\BelongsToTenant;
|
||||
use App\Traits\ModelTrait;
|
||||
|
||||
/**
|
||||
* @mixin IdeHelperDepartment
|
||||
*/
|
||||
class Department extends Model
|
||||
{
|
||||
use SoftDeletes, BelongsToTenant, ModelTrait;
|
||||
@@ -33,7 +37,7 @@ public function departmentUsers()
|
||||
public function users()
|
||||
{
|
||||
// User 네임스페이스가 다르면 여기만 맞춰줘.
|
||||
return $this->belongsToMany(\App\Models\User::class, 'department_user', 'department_id', 'user_id')
|
||||
return $this->belongsToMany(User::class, 'department_user', 'department_id', 'user_id')
|
||||
->withPivot(['tenant_id','is_primary','joined_at','left_at','created_at','updated_at','deleted_at'])
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user