Implementing service contract using this method getting error of "Class string does not exist."
model/userrepository.php
public function deletebyid($del)
{
$hamburger = $this->hamburger;
$hamburger->load($del);
if (! $hamburger->getId())
{
throw new NoSuchEntityException(__('Unable to find hamburger with ID "%1"', $del));
}
return $hamburger->delete();
}
api/userrepositoryinterface.php
/**
* @param int $del
* @return string
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function deletebyid($del);
../etc/webapi.xml
<route method="GET" url="/V1/del/:del">
<service class="Assign\RestService\Api\HamburgerRepositoryInterface" method="deletebyid"/>
<resources>
<resource ref="anonymous"/>
</resources>
i must be not using delete function properly...but i am not clear.