mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Lots of code cleanup.
This commit is contained in:
@@ -46,8 +46,16 @@ class Category implements CUD, CommonDatabaseCalls, CategoryInterface
|
||||
*/
|
||||
public function store(array $data)
|
||||
{
|
||||
// TODO: Implement store() method.
|
||||
throw new NotImplementedException;
|
||||
$category = new \Category;
|
||||
$category->name = $data['name'];
|
||||
$category->class = 'Category';
|
||||
$category->user()->associate($this->getUser());
|
||||
if(!$category->validate()) {
|
||||
var_dump($category->errors());
|
||||
exit();
|
||||
}
|
||||
$category->save();
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user