Extend rule set for import.

This commit is contained in:
James Cole
2016-08-11 18:44:11 +02:00
parent 186b704509
commit 0aaf9a6fda
32 changed files with 349 additions and 72 deletions

View File

@@ -444,6 +444,12 @@ class CategoryRepository implements CategoryRepositoryInterface
*/
public function store(array $data): Category
{
// TODO use validation, not this.
if (strlen($data['name']) > 200 || strlen($data['name']) === 0) {
}
$newCategory = Category::firstOrCreateEncrypted(
[
'user_id' => $data['user'],