예제 #1
0
 function delete($id)
 {
     $store = new store($id);
     //delete city
     $store->delete($store->product);
     $store->delete();
     //redirect to city
     redirect($this->admin . 'stores/list_all/');
 }
예제 #2
0
 function test_delete()
 {
     $test_name = "Nordstrom";
     $test_id = 1;
     $test_store = new store($test_name, $test_id);
     $test_store->save();
     $test_name2 = "Bloomingdales";
     $test_id2 = 2;
     $test_store2 = new Store($test_name2, $test_id2);
     $test_store2->save();
     $test_store->delete();
     $result = Store::getAll();
     $this->assertEquals([$test_store2], $result);
 }
예제 #3
0
 function delete($query, $query_column)
 {
     parent::delete($query, $query_column);
 }