laravel-moderation
laravel-moderation copied to clipboard
Undefined index: column
hi @hootlex I have encountered this error.
"message": "Undefined index: column",
"exception": "ErrorException",
"file": "...\\vendor\\hootlex\\laravel-moderation\\src\\ModerationScope.php",
"line": 404,
In ModerationScope.php are you sure always has attribute in $where array
protected function isModerationConstraint(array $where, $column)
{
return $where['column'] == $column;
}
I try
protected function isModerationConstraint(array $where, $column)
{
if (isset($where['column'])) {
return $where['column'] == $column;
}
return false;
}
I do not know True or False would be better.
ping @hootlex
ping @hootlex
@schranzer235 fork repo and fix it. Or using https://github.com/spatie/laravel-model-status package
thanks for your reply! didn't noticed at first
@schranzer235 see my pull request https://github.com/hootlex/laravel-moderation/pull/40
ping @hootlex
Facing the same, any update?