add some validation to row edit, better handle setting null cols with empty

This commit is contained in:
2018-08-05 18:45:11 +02:00
parent 06fb01d146
commit 6cfd5aa7e9
13 changed files with 164 additions and 90 deletions
+7
View File
@@ -25,6 +25,9 @@ use Illuminate\Database\Eloquent\Collection;
* @property-read string $draftRoute
* @property-read string $settingsRoute
* @property-read string $deleteRoute
* @property-read string $draftSessionKey
* @property-read string $draftDiscardRoute
* @property-read string $draftUpdateRoute
* @property-read User $owner
* @property-read Table $parentTable
* @property-read Table[]|Collection $forks
@@ -136,9 +139,13 @@ class Table extends BaseModel
case 'settingsRoute': return route('table.conf', $arg);
case 'draftRoute': return route('table.draft', $arg);
case 'deleteRoute': return route('table.delete', $arg);
case 'draftDiscardRoute': return route('table.draft-discard', $arg);
case 'draftUpdateRoute': return route('table.draft-update', $arg);
}
}
if ($name == 'draftSessionKey') return "proposal.{$this->id}";
return parent::__get($name);
}