public function destroy($id)
    {
        $note = Note::findOrFail($id);
        $this->authorize('manage', $note);
        $note->delete();
        return fractal($id, new DeletedTransformer())
            ->withResourceName('deletedNote')
            ->respond();
    }
public function destroy($id)
    {
        $note = Note::findOrFail($id);
        $this->authorize('manage', $note);
        $note->delete();
        return fractal($id, new DeletedTransformer())
            ->withResourceName('deletedNote')
            ->respond();
    }
public function destroy ( $ id ) { $ note = Note :: findOrFail ( $ id ) ; $ this -> authorize ( 'manage' , $ note ) ; $ note -> delete ( ) ; return fractal ( $ id , new DeletedTransformer ( ) ) -> withResourceName ( 'deletedNote' ) -> respond ( ) ; }
Delete a Note object
@param string $id UUID of the Note
@return \Illuminate\Http\Response JSON object with status message
Delete a Note object