I need to delete my custom table data, I tried below code, but its not works for me.
my table:
test_id product_id testing
1 15 12345
my code:
try{
$model = $this->zipcodeFactory->create();
$modelcollection = $this->zipcodeFactory->create()->getCollection();
foreach($modelcollection as $modeldata){
$model->load($modeldata['test_id']);
$model->delete();
}
}catch (Exception $e){
}
Suggest Me What i Miss in this code.