%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/graphicd/public_html/vebto/app/Services/Shares/
Upload File :
Create Path :
Current File : /home/graphicd/public_html/vebto/app/Services/Shares/GetUsersWithAccessToEntry.php

<?php

namespace App\Services\Shares;

use App\User;
use App\FileEntry;
use Illuminate\Database\Eloquent\Collection;

class GetUsersWithAccessToEntry
{
    /**
     * @var FileEntry
     */
    private $entry;

    /**
     * @param FileEntry $entry
     */
    public function __construct(FileEntry $entry)
    {
        $this->entry = $entry;
    }

    /**
     * @param int $entryId
     * @return Collection|User[]
     */
    public function execute($entryId)
    {
        return $this->entry->with('users')->find($entryId)->users;
    }
}

Zerion Mini Shell 1.0