From 1a5de7253c62540033d54c8fd01185a2ddeb602a Mon Sep 17 00:00:00 2001 From: wahyuun Date: Mon, 16 Oct 2023 10:58:42 +0700 Subject: [PATCH] add color column --- app/Models/Divisi.php | 83 ++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/app/Models/Divisi.php b/app/Models/Divisi.php index 5a37c85..ac255f4 100644 --- a/app/Models/Divisi.php +++ b/app/Models/Divisi.php @@ -1,41 +1,42 @@ -children()->delete(); - }); - } - - public function parent() - { - return $this->belongsTo('App\Models\Divisi','parent')->where('parent', null)->with('parent'); - } - - public function children() - { - return $this->hasMany('App\Models\Divisi','parent')->with('children'); - } -} +children()->delete(); + }); + } + + public function parent() + { + return $this->belongsTo('App\Models\Divisi','parent')->where('parent', null)->with('parent'); + } + + public function children() + { + return $this->hasMany('App\Models\Divisi','parent')->with('children'); + } +}