exception MissingShopDomainException in laravel osiset - gnikyt/laravel-shopify GitHub Wiki

If you are using larave 8 and want to handle the exception "MissingShopDomainException" then you can handle this exception using handler.php in laravel. Go to app->Exceptions->Handler and write below code:

Include this on top

use Osiset\ShopifyApp\Exceptions\MissingShopDomainException; use Illuminate\Support\Facades\Redirect;

And inside function register write:

public function register(){ $this->renderable(function(MissingShopDomainException $e){ return Redirect::to('https://www.shopify.com/in/login'); }); }

This will redirect to the shopify login page when anyone will try to hit the base url without login.