This is my code in callbackController.php file
$url = 'https://' . $_GET['shop'] . '/admin/webhooks.json';
$webhookData = [
'webhook' => [
'topic' => 'app/uninstalled',
'address' => config('app.url').'uninstall.php?shop='.$shop,
'format' => 'json'
]
];
$uninstall = $sh->appUninstallHook($accessToken, $url, $webhookData);
This is my uninstall.php file code , these file is in laravel root folder.
$connection = new mysqli("localhost", "username", "******", "database");
$delete_shop = "DELETE FROM tablename WHERE store_name= '".$_GET['shop']."'";
$connection->query($delete_shop);
I found solution here, but i can't understand how it works.
Thanks !!