More model updates to more places than I anticipated.

This probably broke a lot of things.
This commit is contained in:
Dane Everitt
2017-02-09 17:43:54 -05:00
parent 0d61417814
commit 4f61637284
21 changed files with 339 additions and 433 deletions

View File

@@ -37,9 +37,10 @@ class LocationRepository
/**
* Creates a new location on the system.
*
* @param array $data
* @throws Pterodactyl\Exceptions\DisplayValidationException
* @return int
* @throws \Pterodactyl\Exceptions\DisplayValidationException
* @return \Pterodactyl\Models\Location
*/
public function create(array $data)
{
@@ -54,14 +55,12 @@ class LocationRepository
throw new DisplayValidationException($validator->errors());
}
$location = new Models\Location;
$location->fill([
$location = Models\Location::create([
'long' => $data['long'],
'short' => $data['short'],
]);
$location->save();
return $location->id;
return $location;
}
/**