mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 03:03:26 +02:00
Change hidden to hide (Eloquent blocked keyword)
This commit is contained in:
@@ -101,18 +101,18 @@ class News
|
||||
return true;
|
||||
}
|
||||
|
||||
static public function toggleHidden($id, &$errors, &$status)
|
||||
static public function toggleHide($id, &$errors, &$status)
|
||||
{
|
||||
if(isset($id))
|
||||
{
|
||||
$row = ModelsNews::find($id);
|
||||
if($row)
|
||||
{
|
||||
$row->hidden = $row->hidden == 1 ? 0 : 1;
|
||||
$row->hide = $row->hide == 1 ? 0 : 1;
|
||||
if (!$row->save()) {
|
||||
$errors[] = 'Fail during toggle hidden News.';
|
||||
$errors[] = 'Fail during toggle hide News.';
|
||||
}
|
||||
$status = $row->hidden;
|
||||
$status = $row->hide;
|
||||
}
|
||||
else
|
||||
$errors[] = 'News with id ' . $id . ' does not exists.';
|
||||
|
Reference in New Issue
Block a user