src/Gzero/Api/Controller/Admin/FileController.php
public function destroy($id)
    {
        $file = $this->fileRepo->getById($id);

        if (!empty($file)) {
            $this->authorize('delete', $file);
            $this->fileRepo->delete($file);
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
public function destroy($id)
    {
        $file = $this->fileRepo->getById($id);

        if (!empty($file)) {
            $this->authorize('delete', $file);
            $this->fileRepo->delete($file);
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
public function destroy ( $ id ) { $ file = $ this -> fileRepo -> getById ( $ id ) ; if ( ! empty ( $ file ) ) { $ this -> authorize ( 'delete' , $ file ) ; $ this -> fileRepo -> delete ( $ file ) ; return $ this -> respondWithSimpleSuccess ( [ 'success' => true ] ) ; } return $ this -> respondNotFound ( ) ; }
Remove the specified file from database.

@param int $id Id of the file

@return \Illuminate\Http\JsonResponse
Remove the specified file from database .