Exemple #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param EntryCrypt $entryCrypt
  * @return Response
  */
 public function destroy($id, EntryCrypt $entryCrypt)
 {
     $model = Share::findOrFail($id);
     $entry = $model->entry;
     if (!$model->delete()) {
         return Response::json(['flash' => 'Unauthorized.'], 403);
     }
     $entryCrypt->removeInvalidShares($entry);
 }