public function delete(Request $request)
    {
        $disk = Storage::disk($request->get('disk'));
        $file = $request->get('file');

        if ($disk->exists($file)) {
            $disk->delete($file);

            return response()->json([
                'status'  => true,
                'message' => trans('admin.delete_succeeded'),
            ]);
        }

        return response()->json([
            'status'  => false,
            'message' => trans('admin.delete_failed'),
        ]);
    }
public function delete(Request $request)
    {
        $disk = Storage::disk($request->get('disk'));
        $file = $request->get('file');

        if ($disk->exists($file)) {
            $disk->delete($file);

            return response()->json([
                'status'  => true,
                'message' => trans('admin.delete_succeeded'),
            ]);
        }

        return response()->json([
            'status'  => false,
            'message' => trans('admin.delete_failed'),
        ]);
    }
public function delete ( Request $ request ) { $ disk = Storage :: disk ( $ request -> get ( 'disk' ) ) ; $ file = $ request -> get ( 'file' ) ; if ( $ disk -> exists ( $ file ) ) { $ disk -> delete ( $ file ) ; return response ( ) -> json ( [ 'status' => true , 'message' => trans ( 'admin.delete_succeeded' ) , ] ) ; } return response ( ) -> json ( [ 'status' => false , 'message' => trans ( 'admin.delete_failed' ) , ] ) ; }
Delete a backup file.

@param Request $request

@return \Illuminate\Http\JsonResponse
Delete a backup file .