added delete fn in resource.php