Fix issue updating categories.

This commit is contained in:
James Cole
2020-04-08 06:43:58 +02:00
parent 136af9625a
commit 4aec1f06e0
2 changed files with 15 additions and 0 deletions

View File

@@ -35,6 +35,9 @@ use Log;
*/
class CategoryUpdateService
{
private $user;
/**
* Constructor.
*/
@@ -43,6 +46,9 @@ class CategoryUpdateService
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
}
if(auth()->check()) {
$this->user = auth()->user();
}
}
/**
@@ -106,4 +112,12 @@ class CategoryUpdateService
}
}
/**
* @param mixed $user
*/
public function setUser($user): void
{
$this->user = $user;
}
}