Update seeders to not error out and allow updating values quickly.

This commit is contained in:
Dane Everitt 2017-03-12 18:02:15 -04:00
parent e791d561ba
commit 97cad1d55e
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 305 additions and 174 deletions

View file

@ -49,7 +49,7 @@ class Service extends Model
*
* @return string
*/
public function defaultIndexFile()
public static function defaultIndexFile()
{
return <<<'EOF'
'use strict';

View file

@ -59,7 +59,7 @@ class ServiceRepository
'description' => (isset($data['description'])) ? $data['description'] : null,
'folder' => $data['folder'],
'startup' => (isset($data['startup'])) ? $data['startup'] : null,
'index_file' => $service->defaultIndexFile(),
'index_file' => Service::defaultIndexFile(),
])->save();
// It is possible for an event to return false or throw an exception