App\Libraries\ProfileCover::set PHP Метод

set() публичный Метод

public set ( $id, $file )
    public function set($id, $file)
    {
        if ($id !== null && in_array($id, $this->availableIds, true)) {
            $this->data['id'] = $id;
        } else {
            $this->data['id'] = null;
        }
        if ($file !== null) {
            $this->storeFile($file->getRealPath());
        }
        return array_only($this->data, ['id', 'file']);
    }