opnform-host-nginx/app/Service/WorkspaceHelper.php

24 lines
373 B
PHP
Raw Normal View History

2022-09-20 21:59:52 +02:00
<?php
namespace App\Service;
use App\Models\Workspace;
class WorkspaceHelper
{
public function __construct(public Workspace $workspace)
{
}
public function getAllUsers()
2022-09-20 21:59:52 +02:00
{
return $this->workspace->users()->withPivot('role')->get();
}
public function getAllInvites()
{
return $this->workspace->invites()->get();
2022-09-20 21:59:52 +02:00
}
}