public function update($id, array $data) { $link = $this->findById($id); $link->update($data); return $link->toArray(); }