public function destroy($id)
    {
        try {
            $this->file->destroy($id);
        
            return response()->json([
                'status' => 'success'
            ]);
        } 

        catch (Exception $e) {
            return $this->handleError($e);
        }
    }
public function destroy($id)
    {
        try {
            $this->file->destroy($id);
        
            return response()->json([
                'status' => 'success'
            ]);
        } 

        catch (Exception $e) {
            return $this->handleError($e);
        }
    }
public function destroy ( $ id ) { try { $ this -> file -> destroy ( $ id ) ; return response ( ) -> json ( [ 'status' => 'success' ] ) ; } catch ( Exception $ e ) { return $ this -> handleError ( $ e ) ; } }
Delete the resource

@param $id
@return JsonResponse
Delete the resource