public function updatePictures($pictures)
    {
        foreach ($pictures as $picture) {
            $image = $this->pictures()->where('id', $picture['id']);

            if ($image->exists()){
               $image->update(['path' => $picture['path']]);
            } else {
               $this->pictures()->create(['path' => $picture['path']]);
            }
        }
    }