Fix visible
This commit is contained in:
@@ -25,6 +25,16 @@ class Category extends parentCategory
|
|||||||
protected $table = 'categories';
|
protected $table = 'categories';
|
||||||
public $translatable = ['name', 'description'];
|
public $translatable = ['name', 'description'];
|
||||||
protected $cascadeDeleteMorph = ['Articles'];
|
protected $cascadeDeleteMorph = ['Articles'];
|
||||||
|
protected $fillable = [
|
||||||
|
'slug',
|
||||||
|
'name',
|
||||||
|
'visible',
|
||||||
|
'description',
|
||||||
|
NestedSet::LFT,
|
||||||
|
NestedSet::RGT,
|
||||||
|
NestedSet::PARENT_ID,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
public function Articles()
|
public function Articles()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class Categories
|
|||||||
|
|
||||||
public static function update($data, $id = false)
|
public static function update($data, $id = false)
|
||||||
{
|
{
|
||||||
$id = $id ? $id : $data['id'];
|
$id = $id ? (int) $id : $data['id'];
|
||||||
$category = self::get($id);
|
$category = self::get($id);
|
||||||
$ret = $category->update($data);
|
$ret = $category->update($data);
|
||||||
// CategoryTrees::update($data, $category->category_id);
|
// CategoryTrees::update($data, $category->category_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user