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'); } }