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