Begin updating UI

This commit is contained in:
Dane Everitt 2017-10-02 22:51:13 -05:00
parent 493c5888a3
commit ae671e6b19
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
22 changed files with 182 additions and 102 deletions

View file

@ -31,7 +31,12 @@ class Service extends Model implements CleansAttributes, ValidableContract
*
* @var array
*/
protected $fillable = ['name', 'author', 'description', 'folder', 'startup', 'index_file'];
protected $fillable = [
'name',
'description',
'startup',
'index_file',
];
/**
* @var array
@ -40,7 +45,6 @@ class Service extends Model implements CleansAttributes, ValidableContract
'author' => 'required',
'name' => 'required',
'description' => 'sometimes',
'folder' => 'required',
'startup' => 'sometimes',
'index_file' => 'required',
];
@ -49,10 +53,9 @@ class Service extends Model implements CleansAttributes, ValidableContract
* @var array
*/
protected static $dataIntegrityRules = [
'author' => 'string|size:36',
'author' => 'email',
'name' => 'string|max:255',
'description' => 'nullable|string',
'folder' => 'string|max:255|regex:/^[\w.-]{1,50}$/|unique:services,folder',
'startup' => 'nullable|string',
'index_file' => 'string',
];
@ -74,12 +77,7 @@ class Service extends Model implements CleansAttributes, ValidableContract
*/
public function packs()
{
return $this->hasManyThrough(
Pack::class,
ServiceOption::class,
'service_id',
'option_id'
);
return $this->hasManyThrough(Pack::class, ServiceOption::class, 'service_id', 'option_id');
}
/**