diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index c7a75d3..957952b 100755 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -1,9 +1,13 @@ -selectTeamStore('StoreUrl', $teamStoreURL); + + if(count($store_array) <= 0) { + return view('merchbay.not_found') + ->with('message', "Store not found"); + } + + // $product_array = $m->selectTeamStoreProducts('TeamStoreId', $store_array[0]->Id); $q = $request->input('q'); @@ -252,6 +259,11 @@ class TeamStoreController extends Controller $store_array = $m->selectTeamStore('StoreUrl', $teamStoreURL); $product_array = $m->selectTeamStoreProducts('ProductURL', $productURL); + if(count($product_array) <= 0) { + return view('merchbay.not_found') + ->with('message', "Store product not found"); + } + $thumbnails_array = $m->getThumbnails($product_array[0]->Id); $teams_array = $m->getTeams($product_array[0]->Id); $selectRoster = $m->selectRoster($product_array[0]->Id); diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php new file mode 100644 index 0000000..565915c --- /dev/null +++ b/resources/views/errors/404.blade.php @@ -0,0 +1,26 @@ +@extends('merchbay_main') + +@section('main-content') + +
+
+
+
+
+

404 - Page not found

+
+
+
+ +
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/merchbay/not_found.blade.php b/resources/views/merchbay/not_found.blade.php new file mode 100644 index 0000000..d76c961 --- /dev/null +++ b/resources/views/merchbay/not_found.blade.php @@ -0,0 +1,27 @@ +@extends('merchbay_main') + +@section('main-content') + +
+
+
+
+
+

404 - Page not found

+ {{ $message }} +
+
+
+ +
+
+
+@endsection \ No newline at end of file