Getting Error when using Laravel Shopify Library

raj302
New Member
2 0 0

I am using the following plugin https://github.com/osiset/laravel-shopify for my larval Shopify app but everytime I try to add another view to the route I am getting a MissingShopingDomain Error.  

I'm not sure what is causing this if its something the way my routes are being written or what's in the script tags in each of the blade templates.  Thanks!

web.php

<?php
use Illuminate\Support\Facades\Route;
Route::middleware(["auth.shopify"])->group(function(){
    Route::view("/","welcome");
    Route::view("/settings","settings");
});
default.blade.php
@extends('shopify-app::layouts.default')
@section('content')
@endsection
 
@section('scripts')
@endsection
welcome.blade.php
@extends('default')
@section('content')
 
<p> This is the welcome page </p>
<a href="/settings"> Go to settings</a>
@endsection
 
@section('scripts')
@parent
<script type="text/javascript">
var AppBridge = window['app-bridge'];
var actions = AppBridge.actions;
var TitleBar = actions.TitleBar;
var Button = actions.Button;
var Redirect = actions.Redirect;
var titleBarOptions = {
title: 'Welcome',
};
var myTitleBar = TitleBar.create(app, titleBarOptions);
</script>
@endsection
settings.blade.php
@extends('default');
@section('content')
<p> This is the Settings page </p>
<a href="/"> Go back to welcome</a>
@endsection
@section('scripts')
@parent
<script type="text/javascript">
var AppBridge = window['app-bridge'];
var actions = AppBridge.actions;
var TitleBar = actions.TitleBar;
var Button = actions.Button;
var Redirect = actions.Redirect;
var titleBarOptions = {
title: 'Welcome',
};
var myTitleBar = TitleBar.create(app, titleBarOptions);
</script>
@endsection
 
0 Likes