Fix known issues from the upgrade guide

This commit is contained in:
Dane Everitt 2017-12-16 13:15:09 -06:00
parent 0dcf2aaed6
commit 3c48947f9d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
11 changed files with 71 additions and 88 deletions

View file

@ -9,8 +9,6 @@
namespace Pterodactyl\Models;
use File;
use Storage;
use Sofa\Eloquence\Eloquence;
use Sofa\Eloquence\Validable;
use Illuminate\Database\Eloquent\Model;
@ -88,30 +86,6 @@ class Pack extends Model implements CleansAttributes, ValidableContract
'version' => 2,
];
/**
* Returns all of the archived files for a given pack.
*
* @param bool $collection
* @return \Illuminate\Support\Collection|object
* @deprecated
*/
public function files($collection = false)
{
$files = collect(Storage::files('packs/' . $this->uuid));
$files = $files->map(function ($item) {
$path = storage_path('app/' . $item);
return (object) [
'name' => basename($item),
'hash' => sha1_file($path),
'size' => File::humanReadableSize($path),
];
});
return ($collection) ? $files : (object) $files->all();
}
/**
* Gets egg associated with a service pack.
*