Initial Commit

The initial public commit of MVGL website code.
This commit is contained in:
Jimmy B. 2024-01-14 13:51:43 -06:00
commit b39ecf1638
2043 changed files with 215154 additions and 0 deletions

View file

@ -0,0 +1,172 @@
@php
$nav = array(
array('title' => 'Overview', 'view' => 'account/overview'),
array('title' => 'Settings', 'view' => 'account/settings'),
// array('title' => 'Security', 'view' => ''),
);
@endphp
<!--begin::Navbar-->
<div class="card {{ $class }}">
<div class="card-body pt-9 pb-0">
<!--begin::Details-->
<div class="d-flex flex-wrap flex-sm-nowrap mb-3">
<!--begin: Pic-->
<div class="me-7 mb-4">
<div class="symbol symbol-100px symbol-lg-160px symbol-fixed position-relative">
<img src="{{ auth()->user()->avatar_url }}" alt="image"/>
<div class="position-absolute translate-middle bottom-0 start-100 mb-6 bg-success rounded-circle border border-4 border-white h-20px w-20px"></div>
</div>
</div>
<!--end::Pic-->
<!--begin::Info-->
<div class="flex-grow-1">
<!--begin::Title-->
<div class="d-flex justify-content-between align-items-start flex-wrap mb-2">
<!--begin::User-->
<div class="d-flex flex-column">
<!--begin::Name-->
<div class="d-flex align-items-center mb-2">
<a href="#" class="text-gray-800 text-hover-primary fs-2 fw-bolder me-1">{{ auth()->user()->username }}</a>
<a href="#">
{!! theme()->getSvgIcon("icons/duotune/general/gen026.svg", "svg-icon-1 svg-icon-primary") !!}
</a>
<a href="#" class="btn btn-sm btn-light-success fw-bolder ms-2 fs-8 py-1 px-3" data-bs-toggle="modal" data-bs-target="#kt_modal_upgrade_plan">{{ __('Upgrade to Pro') }}</a>
</div>
<!--end::Name-->
<!--begin::Info-->
<div class="d-flex flex-wrap fw-bold fs-6 mb-4 pe-2">
<a href="#" class="d-flex align-items-center text-gray-400 text-hover-primary me-5 mb-2">
{!! theme()->getSvgIcon("icons/duotune/communication/com006.svg", "svg-icon-4 me-1") !!}
Developer
</a>
<a href="#" class="d-flex align-items-center text-gray-400 text-hover-primary me-5 mb-2">
{!! theme()->getSvgIcon("icons/duotune/general/gen018.svg", "svg-icon-4 me-1") !!}
SF, Bay Area
</a>
<a href="#" class="d-flex align-items-center text-gray-400 text-hover-primary mb-2">
{!! theme()->getSvgIcon("icons/duotune/communication/com011.svg", "svg-icon-4 me-1") !!}
{{ auth()->user()->email }}
</a>
</div>
<!--end::Info-->
</div>
<!--end::User-->
<!--begin::Actions-->
<div class="d-flex my-4">
<a href="#" class="btn btn-sm btn-light me-2" id="kt_user_follow_button">
{!! theme()->getSvgIcon("icons/duotune/arrows/arr012.svg", "svg-icon-3 d-none") !!}
{{ theme()->getView('partials/general/_button-indicator', array('label' => 'Follow')) }}
</a>
<a href="#" class="btn btn-sm btn-primary me-3" data-bs-toggle="tooltip" data-bs-placement="left" data-bs-trigger="hover" title="Coming soon">Hire Me</a>
<!--begin::Menu-->
<div class="me-0">
<button class="btn btn-sm btn-icon btn-bg-light btn-active-color-primary" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end">
<i class="bi bi-three-dots fs-3"></i>
</button>
{{ theme()->getView('partials/menus/_menu-3') }}
</div>
<!--end::Menu-->
</div>
<!--end::Actions-->
</div>
<!--end::Title-->
<!--begin::Stats-->
<div class="d-flex flex-wrap flex-stack">
<!--begin::Wrapper-->
<div class="d-flex flex-column flex-grow-1 pe-8">
<!--begin::Stats-->
<div class="d-flex flex-wrap">
<!--begin::Stat-->
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-6 mb-3">
<!--begin::Number-->
<div class="d-flex align-items-center">
{!! theme()->getSvgIcon("icons/duotune/arrows/arr066.svg", "svg-icon-3 svg-icon-success me-2") !!}
<div class="fs-2 fw-bolder" data-kt-countup="true" data-kt-countup-value="4500" data-kt-countup-prefix="$">0</div>
</div>
<!--end::Number-->
<!--begin::Label-->
<div class="fw-bold fs-6 text-gray-400">{{ __('Earnings') }}</div>
<!--end::Label-->
</div>
<!--end::Stat-->
<!--begin::Stat-->
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-6 mb-3">
<!--begin::Number-->
<div class="d-flex align-items-center">
{!! theme()->getSvgIcon("icons/duotune/arrows/arr065.svg", "svg-icon-3 svg-icon-danger me-2") !!}
<div class="fs-2 fw-bolder" data-kt-countup="true" data-kt-countup-value="75">0</div>
</div>
<!--end::Number-->
<!--begin::Label-->
<div class="fw-bold fs-6 text-gray-400">{{ __('Projects') }}</div>
<!--end::Label-->
</div>
<!--end::Stat-->
<!--begin::Stat-->
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-6 mb-3">
<!--begin::Number-->
<div class="d-flex align-items-center">
{!! theme()->getSvgIcon("icons/duotune/arrows/arr066.svg", "svg-icon-3 svg-icon-success me-2") !!}
<div class="fs-2 fw-bolder" data-kt-countup="true" data-kt-countup-value="60" data-kt-countup-prefix="%">0</div>
</div>
<!--end::Number-->
<!--begin::Label-->
<div class="fw-bold fs-6 text-gray-400">{{ __('Success Rate') }}</div>
<!--end::Label-->
</div>
<!--end::Stat-->
</div>
<!--end::Stats-->
</div>
<!--end::Wrapper-->
<!--begin::Progress-->
<div class="d-flex align-items-center w-200px w-sm-300px flex-column mt-3">
<div class="d-flex justify-content-between w-100 mt-auto mb-2">
<span class="fw-bold fs-6 text-gray-400">{{ __('Profile Completion') }}</span>
<span class="fw-bolder fs-6">50%</span>
</div>
<div class="h-5px mx-3 w-100 bg-light mb-3">
<div class="bg-success rounded h-5px" role="progressbar" style="width: 50%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
<!--end::Progress-->
</div>
<!--end::Stats-->
</div>
<!--end::Info-->
</div>
<!--end::Details-->
<!--begin::Navs-->
<div class="d-flex overflow-auto h-55px">
<ul class="nav nav-stretch nav-line-tabs nav-line-tabs-2x border-transparent fs-5 fw-bolder flex-nowrap">
@foreach($nav as $each)
<!--begin::Nav item-->
<li class="nav-item">
<a class="nav-link text-active-primary me-6 {{ theme()->getPagePath() === $each['view'] ? 'active' : '' }}" href="{{ $each['view'] ? theme()->getPageUrl($each['view']) : '#' }}">
{{ $each['title'] }}
</a>
</li>
<!--end::Nav item-->
@endforeach
</ul>
</div>
<!--begin::Navs-->
</div>
</div>
<!--end::Navbar-->

View file

@ -0,0 +1,134 @@
<!--begin::details View-->
<div class="card mb-5 mb-xl-10" id="kt_profile_details_view">
<!--begin::Card header-->
<div class="card-header cursor-pointer">
<!--begin::Card title-->
<div class="card-title m-0">
<h3 class="fw-bolder m-0">{{ __('Profile Details') }}</h3>
</div>
<!--end::Card title-->
<!--begin::Action-->
<a href="{{ theme()->getPageUrl('account/settings') }}" class="btn btn-primary align-self-center">{{ __('Edit Profile') }}</a>
<!--end::Action-->
</div>
<!--begin::Card header-->
<!--begin::Card body-->
<div class="card-body p-9">
<!--begin::Row-->
<div class="row mb-7">
<!--begin::Label-->
<label class="col-lg-4 fw-bold text-muted">{{ __('Full Name') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8">
<span class="fw-bolder fs-6 text-dark">{{ auth()->user()->name }}</span>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
<!--begin::Input group-->
<div class="row mb-7">
<!--begin::Label-->
<label class="col-lg-4 fw-bold text-muted">{{ __('Company') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<span class="fw-bold fs-6">{{ $info->company }}</span>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-7">
<!--begin::Label-->
<label class="col-lg-4 fw-bold text-muted">
{{ __('Contact Phone') }}
<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Phone number must be active"></i>
</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 d-flex align-items-center">
<span class="fw-bolder fs-6 me-2">{{ $info->phone }}</span>
@if($info->phone)
<span class="badge badge-success">{{ __('Verified') }}</span>
@endif
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-7">
<!--begin::Label-->
<label class="col-lg-4 fw-bold text-muted">{{ __('Website') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8">
<a href="#" class="fw-bold fs-6 text-dark text-hover-primary">{{ $info->website }}</a>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-7">
<!--begin::Label-->
<label class="col-lg-4 fw-bold text-muted">
{{ __('Country') }}
<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Country of origination"></i>
</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8">
<span class="fw-bolder fs-6 text-dark">
{{ $info->country ? collect(\App\Core\Data::getCountriesList())->get($info->country)['name'] : '-' }}
</span>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-7">
<!--begin::Label-->
<label class="col-lg-4 fw-bold text-muted">{{ __('Communication') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8">
<span class="fw-bolder fs-6 text-dark">
{{ implode(', ', array_map('ucwords', array_keys(array_filter($info->communication ?? []) ?? []))) }}
</span>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-10">
<!--begin::Label-->
<label class="col-lg-4 fw-bold text-muted">{{ __('Allow Changes') }}</label>
<!--begin::Label-->
<!--begin::Label-->
<div class="col-lg-8">
<span class="fw-bold fs-6">{{ __('Yes') }}</span>
</div>
<!--begin::Label-->
</div>
<!--end::Input group-->
</div>
<!--end::Card body-->
</div>
<!--end::details View-->

View file

@ -0,0 +1,39 @@
<x-base-layout>
{{ theme()->getView('pages/account/_navbar', array('class' => 'mb-5 mb-xl-10')) }}
{{ theme()->getView('pages/account/overview/_details', array('class' => 'mb-5 mb-xl-10', 'info' => auth()->user()->info)) }}
<!--begin::Row-->
<div class="row gy-10 gx-xl-10">
<!--begin::Col-->
<div class="col-xl-6">
{{ theme()->getView('partials/widgets/charts/_widget-1', array('class' => 'card-xxl-stretch mb-5 mb-xl-10')) }}
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xl-6">
{{ theme()->getView('partials/widgets/tables/_widget-1', array('class' => 'card-xxl-stretch mb-5 mb-xl-10')) }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
<!--begin::Row-->
<div class="row gy-10 gx-xl-10">
<!--begin::Col-->
<div class="col-xl-6">
{{ theme()->getView('partials/widgets/lists/_widget-5', array('class' => 'card-xxl-stretch mb-5 mb-xl-10')) }}
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xl-6">
{{ theme()->getView('partials/widgets/tables/_widget-5', array('class' => 'card-xxl-stretch mb-5 mb-xl-10')) }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,300 @@
<!--begin::Basic info-->
<div class="card {{ $class }}">
<!--begin::Card header-->
<div class="card-header border-0 cursor-pointer" role="button" data-bs-toggle="collapse" data-bs-target="#kt_account_profile_details" aria-expanded="true" aria-controls="kt_account_profile_details">
<!--begin::Card title-->
<div class="card-title m-0">
<h3 class="fw-bolder m-0">{{ __('Profile Details') }}</h3>
</div>
<!--end::Card title-->
</div>
<!--begin::Card header-->
<!--begin::Content-->
<div id="kt_account_profile_details" class="collapse show">
<!--begin::Form-->
<form id="kt_account_profile_details_form" class="form" method="POST" action="{{ route('settings.update') }}" enctype="multipart/form-data">
@csrf
@method('PUT')
<!--begin::Card body-->
<div class="card-body border-top p-9">
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">{{ __('Avatar') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8">
<!--begin::Image input-->
<div class="image-input image-input-outline {{ isset($info) && $info->avatar ? '' : 'image-input-empty' }}" data-kt-image-input="true" style="background-image: url({{ asset(theme()->getMediaUrlPath() . 'avatars/blank.png') }})">
<!--begin::Preview existing avatar-->
<div class="image-input-wrapper w-125px h-125px" style="background-image: {{ isset($info) && $info->avatar_url ? 'url('.asset($info->avatar_url).')' : 'none' }};"></div>
<!--end::Preview existing avatar-->
<!--begin::Label-->
<label class="btn btn-icon btn-circle btn-active-color-primary w-25px h-25px bg-body shadow" data-kt-image-input-action="change" data-bs-toggle="tooltip" title="Change avatar">
<i class="bi bi-pencil-fill fs-7"></i>
<!--begin::Inputs-->
<input type="file" name="avatar" accept=".png, .jpg, .jpeg"/>
<input type="hidden" name="avatar_remove"/>
<!--end::Inputs-->
</label>
<!--end::Label-->
<!--begin::Cancel-->
<span class="btn btn-icon btn-circle btn-active-color-primary w-25px h-25px bg-body shadow" data-kt-image-input-action="cancel" data-bs-toggle="tooltip" title="Cancel avatar">
<i class="bi bi-x fs-2"></i>
</span>
<!--end::Cancel-->
<!--begin::Remove-->
<span class="btn btn-icon btn-circle btn-active-color-primary w-25px h-25px bg-body shadow" data-kt-image-input-action="remove" data-bs-toggle="tooltip" title="Remove avatar">
<i class="bi bi-x fs-2"></i>
</span>
<!--end::Remove-->
</div>
<!--end::Image input-->
<!--begin::Hint-->
<div class="form-text">Allowed file types: png, jpg, jpeg.</div>
<!--end::Hint-->
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label required fw-bold fs-6">{{ __('Full Name') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8">
<!--begin::Row-->
<div class="row">
<!--begin::Col-->
<div class="col-lg-6 fv-row">
<input type="text" name="first_name" class="form-control form-control-lg form-control-solid mb-3 mb-lg-0" placeholder="First name" value="{{ old('first_name', auth()->user()->first_name ?? '') }}"/>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-lg-6 fv-row">
<input type="text" name="last_name" class="form-control form-control-lg form-control-solid" placeholder="Last name" value="{{ old('last_name', auth()->user()->last_name ?? '') }}"/>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">{{ __('Company') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<input type="text" name="company" class="form-control form-control-lg form-control-solid" placeholder="Company name" value="{{ old('company', $info->company ?? '') }}"/>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">
<span class="required">{{ __('Contact Phone') }}</span>
<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="{{ __('Phone number must be active') }}"></i>
</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<input type="tel" name="phone" class="form-control form-control-lg form-control-solid" placeholder="Phone number" value="{{ old('phone', $info->phone ?? '') }}"/>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">{{ __('Company Site') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<input type="text" name="website" class="form-control form-control-lg form-control-solid" placeholder="Company website" value="{{ old('website', $info->website ?? '') }}"/>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">
<span class="required">{{ __('Country') }}</span>
<i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="{{ __('Country of origination') }}"></i>
</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<select name="country" aria-label="{{ __('Select a Country') }}" data-control="select2" data-placeholder="{{ __('Select a country...') }}" class="form-select form-select-solid form-select-lg fw-bold">
<option value="">{{ __('Select a Country...') }}</option>
@foreach(\App\Core\Data::getCountriesList() as $key => $value)
<option data-kt-flag="{{ $value['flag'] }}" value="{{ $key }}" {{ $key === old('country', $info->country ?? '') ? 'selected' :'' }}>{{ $value['name'] }}</option>
@endforeach
</select>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label required fw-bold fs-6">{{ __('Language') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<!--begin::Input-->
<select name="language" aria-label="{{ __('Select a Language') }}" data-control="select2" data-placeholder="{{ __('Select a language...') }}" class="form-select form-select-solid form-select-lg">
<option value="">{{ __('Select a Language...') }}</option>
@foreach(\App\Core\Data::getLanguagesList() as $key => $value)
<option data-kt-flag="{{ $value['country']['flag'] }}" value="{{ $key }}" {{ $key === old('language', $info->language ?? '') ? 'selected' :'' }}>{{ $value['name'] }}</option>
@endforeach
</select>
<!--end::Input-->
<!--begin::Hint-->
<div class="form-text">
{{ __('Please select a preferred language, including date, time, and number formatting.') }}
</div>
<!--end::Hint-->
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label required fw-bold fs-6">{{ __('Time Zone') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<select name="timezone" aria-label="{{ __('Select a Timezone') }}" data-control="select2" data-placeholder="{{ __('Select a timezone..') }}" class="form-select form-select-solid form-select-lg">
<option value="">{{ __('Select a Timezone..') }}</option>
@foreach(\App\Core\Data::getTimeZonesList() as $key => $value)
<option data-bs-offset="{{ $value['offset'] }}" value="{{ $key }}" {{ $key === old('timezone', $info->timezone ?? '') ? 'selected' :'' }}>{{ $value['name'] }}</option>
@endforeach
</select>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">{{ __('Currency') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<select name="currency" aria-label="{{ __('Select a Currency') }}" data-control="select2" data-placeholder="{{ __('Select a currency..') }}" class="form-select form-select-solid form-select-lg">
<option value="">{{ __('Select a currency..') }}</option>
@foreach(\App\Core\Data::getCurrencyList() as $key => $value)
<option data-kt-flag="{{ $value['country']['flag'] }}" value="{{ $key }}" {{ $key === old('currency', $info->currency ?? '') ? 'selected' :'' }}><b>{{ $key }}</b>&nbsp;-&nbsp;{{ $value['name'] }}</option>
@endforeach
</select>
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-6">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">{{ __('Communication') }}</label>
<!--end::Label-->
<!--begin::Col-->
<div class="col-lg-8 fv-row">
<!--begin::Options-->
<div class="d-flex align-items-center mt-3">
<!--begin::Option-->
<label class="form-check form-check-inline form-check-solid me-5">
<input type="hidden" name="communication[email]" value="0">
<input class="form-check-input" name="communication[email]" type="checkbox" value="1" {{ old('marketing', $info->communication['email'] ?? '') ? 'checked' : '' }}/>
<span class="fw-bold ps-2 fs-6">
{{ __('Email') }}
</span>
</label>
<!--end::Option-->
<!--begin::Option-->
<label class="form-check form-check-inline form-check-solid">
<input type="hidden" name="communication[phone]" value="0">
<input class="form-check-input" name="communication[phone]" type="checkbox" value="1" {{ old('email', $info->communication['phone'] ?? '') ? 'checked' : '' }}/>
<span class="fw-bold ps-2 fs-6">
{{ __('Phone') }}
</span>
</label>
<!--end::Option-->
</div>
<!--end::Options-->
</div>
<!--end::Col-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="row mb-0">
<!--begin::Label-->
<label class="col-lg-4 col-form-label fw-bold fs-6">{{ __('Allow Marketing') }}</label>
<!--begin::Label-->
<!--begin::Label-->
<div class="col-lg-8 d-flex align-items-center">
<div class="form-check form-check-solid form-switch fv-row">
<input type="hidden" name="marketing" value="0">
<input class="form-check-input w-45px h-30px" type="checkbox" id="allowmarketing" name="marketing" value="1" {{ old('marketing', $info->marketing ?? '') ? 'checked' : '' }}/>
<label class="form-check-label" for="allowmarketing"></label>
</div>
</div>
<!--begin::Label-->
</div>
<!--end::Input group-->
</div>
<!--end::Card body-->
<!--begin::Actions-->
<div class="card-footer d-flex justify-content-end py-6 px-9">
<button type="reset" class="btn btn-white btn-active-light-primary me-2">{{ __('Discard') }}</button>
<button type="submit" class="btn btn-primary" id="kt_account_profile_details_submit">
@include('partials.general._button-indicator', ['label' => __('Save Changes')])
</button>
</div>
<!--end::Actions-->
</form>
<!--end::Form-->
</div>
<!--end::Content-->
</div>
<!--end::Basic info-->

View file

@ -0,0 +1,133 @@
<!--begin::Sign-in Method-->
<div class="card {{ $class ?? '' }}" {{ util()->putHtmlAttributes(array('id' => $id ?? '')) }}>
<!--begin::Card header-->
<div class="card-header border-0 cursor-pointer" role="button" data-bs-toggle="collapse" data-bs-target="#kt_account_signin_method">
<div class="card-title m-0">
<h3 class="fw-bolder m-0">{{ __('Sign-in Method') }}</h3>
</div>
</div>
<!--end::Card header-->
<!--begin::Content-->
<div id="kt_account_signin_method" class="collapse show">
<!--begin::Card body-->
<div class="card-body border-top p-9">
<!--begin::Email Address-->
<div class="d-flex flex-wrap align-items-center">
<!--begin::Label-->
<div id="kt_signin_email">
<div class="fs-6 fw-bolder mb-1">{{ __('Email Address') }}</div>
<div class="fw-bold text-gray-600">{{ auth()->user()->email }}</div>
</div>
<!--end::Label-->
<!--begin::Edit-->
<div id="kt_signin_email_edit" class="flex-row-fluid d-none">
<!--begin::Form-->
<form id="kt_signin_change_email" class="form" novalidate="novalidate" method="POST" action="{{ route('settings.changeEmail') }}">
@csrf
@method('PUT')
<input type="hidden" name="current_email" value="{{ auth()->user()->email }} "/>
<div class="row mb-6">
<div class="col-lg-6 mb-4 mb-lg-0">
<div class="fv-row mb-0">
<label for="email" class="form-label fs-6 fw-bolder mb-3">{{ __('Enter New Email Address') }}</label>
<input type="email" class="form-control form-control-lg form-control-solid" placeholder="{{ __('Email Address') }}" name="email" value="{{ old('email') }}" id="email"/>
</div>
</div>
<div class="col-lg-6">
<div class="fv-row mb-0">
<label for="current_password" class="form-label fs-6 fw-bolder mb-3">{{ __('Confirm Password') }}</label>
<input type="password" class="form-control form-control-lg form-control-solid" name="current_password" id="current_password"/>
</div>
</div>
</div>
<div class="d-flex">
<button id="kt_signin_submit" type="button" class="btn btn-primary me-2 px-6">
@include('partials.general._button-indicator', ['label' => __('Update Email')])
</button>
<button id="kt_signin_cancel" type="button" class="btn btn-color-gray-400 btn-active-light-primary px-6">{{ __('Cancel') }}</button>
</div>
</form>
<!--end::Form-->
</div>
<!--end::Edit-->
<!--begin::Action-->
<div id="kt_signin_email_button" class="ms-auto">
<button class="btn btn-light btn-active-light-primary">{{ __('Change Email') }}</button>
</div>
<!--end::Action-->
</div>
<!--end::Email Address-->
<!--begin::Separator-->
<div class="separator separator-dashed my-6"></div>
<!--end::Separator-->
<!--begin::Password-->
<div class="d-flex flex-wrap align-items-center mb-10">
<!--begin::Label-->
<div id="kt_signin_password">
<div class="fs-6 fw-bolder mb-1">{{ __('Password') }}</div>
<div class="fw-bold text-gray-600">************</div>
</div>
<!--end::Label-->
<!--begin::Edit-->
<div id="kt_signin_password_edit" class="flex-row-fluid d-none">
<!--begin::Form-->
<form id="kt_signin_change_password" class="form" novalidate="novalidate" method="POST" action="{{ route('settings.changePassword') }}">
@csrf
@method('PUT')
<input type="hidden" name="current_email" value="{{ auth()->user()->email }} "/>
<div class="row mb-1">
<div class="col-lg-4">
<div class="fv-row mb-0">
<label for="current_password" class="form-label fs-6 fw-bolder mb-3">{{ __('Current Password') }}</label>
<input type="password" class="form-control form-control-lg form-control-solid" name="current_password" id="current_password"/>
</div>
</div>
<div class="col-lg-4">
<div class="fv-row mb-0">
<label for="password" class="form-label fs-6 fw-bolder mb-3">{{ __('New Password') }}</label>
<input type="password" class="form-control form-control-lg form-control-solid" name="password" id="password"/>
</div>
</div>
<div class="col-lg-4">
<div class="fv-row mb-0">
<label for="password_confirmation" class="form-label fs-6 fw-bolder mb-3">{{ __('Confirm New Password') }}</label>
<input type="password" class="form-control form-control-lg form-control-solid" name="password_confirmation" id="password_confirmation"/>
</div>
</div>
</div>
<div class="form-text mb-5">{{ __('Password must be at least 8 character and contain symbols') }}</div>
<div class="d-flex">
<button id="kt_password_submit" type="button" class="btn btn-primary me-2 px-6">
@include('partials.general._button-indicator', ['label' => __('Update Password')])
</button>
<button id="kt_password_cancel" type="button" class="btn btn-color-gray-400 btn-active-light-primary px-6">{{ __('Cancel') }}</button>
</div>
</form>
<!--end::Form-->
</div>
<!--end::Edit-->
<!--begin::Action-->
<div id="kt_signin_password_button" class="ms-auto">
<button class="btn btn-light btn-active-light-primary">{{ __('Reset Password') }}</button>
</div>
<!--end::Action-->
</div>
<!--end::Password-->
</div>
<!--end::Card body-->
</div>
<!--end::Content-->
</div>
<!--end::Sign-in Method-->

View file

@ -0,0 +1,9 @@
<x-base-layout>
{{ theme()->getView('pages/account/_navbar', array('class' => 'mb-5 mb-xl-10', 'info' => $info)) }}
{{ theme()->getView('pages/account/settings/_profile-details', array('class' => 'mb-5 mb-xl-10', 'info' => $info)) }}
{{ theme()->getView('pages/account/settings/_signin-method', array('class' => 'mb-5 mb-xl-10', 'info' => $info)) }}
</x-base-layout>

View file

@ -0,0 +1,382 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Genre;
use App\Models\Platform;
@endphp
{{-- Check to see if the user is logged in. --}}
@if (Auth::check())
{{-- Check role of user. --}}
@if (
Auth::user()->role_id != 1 &&
Auth::user()->role_id != 2 &&
Auth::user()->role_id != 3
)
{{-- Redirect to home page. --}}
<script>window.location = "/";</script>
@endif
@endif
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Clone Game - {{ $game->name }}</h3>
</div>
<div class="card-body">
@if (count($errors) > 0)
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5 mb-10">
<span class="svg-icon svg-icon-2hx svg-icon-danger me-4">
<i class="fad fa-times-circle"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-danger">Error Adding Game</h4>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
<!--end::Alert-->
@endif
<form class="form w-100" novalidate="novalidate" action="{{ route('admin.game.store') }}" method="post" enctype="multipart/form-data">
@csrf
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Name</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="name" value="{{ old('name') ?? $game->name }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Alternative Titles</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="alt_titles" placeholder="Alt Title 1|Alt Title 2|Alt Title3" value="{{ old('alt_titles') ?? $game->alt_titles }}" />
<div class="text-muted mt-1">Please use the pipe character <code>|</code> to separate each alternative title. Do not include any spaces before or after the pipe.</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Platform</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="platform_id">
<option></option>
@php
$platforms = Platform::all()->sortBy('name');
@endphp
@foreach ($platforms as $platform)
<option value="{{ $platform->id }}" @selected(old('platform_id') == $platform->id)>
{{ $platform->name }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-12 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Description</label>
<!--end::Label-->
<!--begin::Input-->
<textarea class="form-control" data-kt-autosize="true" rows="5" name="description">{{ old('description') ?? $game->description }}</textarea>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-8 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Source</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="source" placeholder="https://domain.com" value="{{ old('source') ?? $game->source }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Boxart</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="file" name="boxart" value="" />
<!--end::Input-->
<div class="text-muted mt-1">Boxart images must not be over <code>512kb</code> and must be a <code>JPG/JPEG</code>, <code>GIF</code> or <code>PNG</code> file.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<hr />
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Genres</label>
<!--end::Label-->
<!--begin::Input-->
@php
$genres = Genre::all()->sortBy('name');
@endphp
@foreach ($genres as $genre)
<div class="mb-2">
<div class="form-check form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" name="genre_ids[]" value="{{ $genre->id }}" id="{{ $genre->name }}" @checked(in_array($genre->id, explode(',', $game->genre_ids))) {{ (in_array($genre->id, old('genre_ids', []))) ? "checked" : (in_array($genre->id, explode(',', $game->genre_ids))) }}>
<label class="form-check-label" for="{{ $genre->name }}">
{{ $genre->name }}
</label>
</div>
</div>
@endforeach
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Developer(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="developers" value="{{ old('developers') ?? $game->developers }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple developers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Publishers(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="publishers" value="{{ old('publishers') ?? $game->publishers }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple publishers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Composer(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="composers" value="{{ old('composers') ?? $game->composers }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple composers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Official Website</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="website" placeholder="https://domain.com" value="{{ old('website') ?? $game->website }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">NA Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="na_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('na_release_date') ?? $game->na_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">JP Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="jp_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('jp_release_date') ?? $game->jp_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">EU Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="eu_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('eu_release_date') ?? $game->eu_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">AUS Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="aus_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('aus_release_date') ?? $game->aus_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">ESRB Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="esrb_rating">
<option></option>
@php
$esrbRatings = [
1 => 'Everyone',
2 => 'Everyone 10+',
3 => 'Teen',
4 => 'Mature 17+',
5 => 'Adults Only 18+',
6 => 'Rating Pending',
7 => 'Rating Pending - Likely Mature 17+'
]
@endphp
@foreach ($esrbRatings as $key => $value)
<option value="{{ $value }}" @selected(old('esrb_rating') ?? $game->esrb_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">PEGI Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="pegi_rating">
<option></option>
@php
$pegiRatings = [
1 => 'PEGI 3',
2 => 'PEGI 7',
3 => 'PEGI 12',
4 => 'PEGI 16',
5 => 'PEGI 18'
]
@endphp
@foreach ($pegiRatings as $key => $value)
<option value="{{ $value }}" @selected(old('pegi_rating') ?? $game->pegi_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">CERO Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="cero_rating">
<option></option>
@php
$ceroRatings = [
1 => 'CERO A',
2 => 'CERO B',
3 => 'CERO C',
4 => 'CERO D',
5 => 'CERO Z'
]
@endphp
@foreach ($ceroRatings as $key => $value)
<option value="{{ $value }}" @selected(old('cero_rating') ?? $game->cero_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">ACB Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="acb_rating">
<option></option>
@php
$acbRatings = [
1 => 'E',
2 => 'G',
3 => 'PG',
4 => 'M',
5 => 'MA',
6 => 'MA 15+',
7 => 'R 18+',
8 => 'X 18+'
]
@endphp
@foreach ($acbRatings as $key => $value)
<option value="{{ $value }}" @selected(old('acb_rating') ?? $game->acb_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Alert-->
<div class="alert alert-primary d-flex align-items-center p-5 mb-5">
<span class="svg-icon svg-icon-2hx svg-icon-primary me-4">
<i class="fal fa-circle-info"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-primary">Hold On!</h4>
<p>Before you submit your update, please ensure you've followed <a href="https://internal.myvideogamelist.com/w/job-guidelines/game-database-administrator/">our guidelines</a>. Thank you!</p>
</div>
</div>
<!--end::Alert-->
<!--begin::Actions-->
<!--begin::Submit button-->
<button type="submit" class="btn btn-primary">
<span class="indicator-label">Submit</span>
<span class="indicator-progress">Please wait...
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
</span>
</button>
<!--end::Submit button-->
<!--end::Actions-->
</form>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,383 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Genre;
use App\Models\Platform;
@endphp
{{-- Check to see if the user is logged in. --}}
@if (Auth::check())
{{-- Check role of user. --}}
@if (
Auth::user()->role_id != 1 &&
Auth::user()->role_id != 2 &&
Auth::user()->role_id != 3
)
{{-- Redirect to home page. --}}
<script>window.location = "/";</script>
@endif
@endif
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Add Game</h3>
</div>
<div class="card-body">
@if (count($errors) > 0)
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5 mb-10">
<span class="svg-icon svg-icon-2hx svg-icon-danger me-4">
<i class="fad fa-times-circle"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-danger">Error Adding Game</h4>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
<!--end::Alert-->
@endif
<form class="form w-100" novalidate="novalidate" action="{{ route('admin.game.store') }}" method="post" enctype="multipart/form-data">
@csrf
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Name</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="name" value="{{ old('name') }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Alternative Titles</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="alt_titles" placeholder="Alt Title 1|Alt Title 2|Alt Title3" value="{{ old('alt_titles') }}" />
<div class="text-muted mt-1">Please use the pipe character <code>|</code> to separate each alternative title. Do not include any spaces before or after the pipe.</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Platform</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="platform_id">
<option></option>
@php
$platforms = Platform::all()->sortBy('name');
@endphp
@foreach ($platforms as $platform)
<option value="{{ $platform->id }}" @selected(old('platform_id') == $platform->id)>
{{ $platform->name }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-12 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Description</label>
<!--end::Label-->
<!--begin::Input-->
<textarea class="form-control" data-kt-autosize="true" rows="5" name="description">{{ old('description') }}</textarea>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Source</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="source" placeholder="https://domain.com" value="{{ old('source') }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Boxart</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="file" name="boxart" value="" />
<!--end::Input-->
<div class="text-muted mt-1">Boxart images must not be over <code>512kb</code> and must be a <code>JPG/JPEG</code>, <code>GIF</code> or <code>PNG</code> file.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Genres</label>
<!--end::Label-->
<!--begin::Input-->
@php
$genres = Genre::all()->sortBy('name');
@endphp
@foreach ($genres as $genre)
<div class="mb-2">
<div class="form-check form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" name="genre_ids[]" value="{{ $genre->id }}" id="{{ $genre->name }}" @checked(old('genre_ids') == $genre->id)>
<label class="form-check-label" for="{{ $genre->name }}">
{{ $genre->name }}
</label>
</div>
</div>
@endforeach
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Developer(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="developers" value="{{ old('developers') }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple developers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Publishers(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="publishers" value="{{ old('publishers') }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple publishers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Composer(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="composers" value="{{ old('composers') }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple composers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Official Website</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="website" placeholder="https://domain.com" value="{{ old('website') }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">NA Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="na_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('na_release_date') }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">JP Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="jp_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('jp_release_date') }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">EU Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="eu_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('eu_release_date') }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">AUS Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="aus_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('aus_release_date') }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">ESRB Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="esrb_rating">
<option></option>
@php
$esrbRatings = [
1 => 'Everyone',
2 => 'Everyone 10+',
3 => 'Teen',
4 => 'Mature 17+',
5 => 'Adults Only 18+',
6 => 'Rating Pending',
7 => 'Rating Pending - Likely Mature 17+'
]
@endphp
@foreach ($esrbRatings as $key => $value)
<option value="{{ $value }}" @selected(old('esrb_rating') == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">PEGI Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="pegi_rating">
<option></option>
@php
$pegiRatings = [
1 => 'PEGI 3',
2 => 'PEGI 7',
3 => 'PEGI 12',
4 => 'PEGI 16',
5 => 'PEGI 18'
]
@endphp
@foreach ($pegiRatings as $key => $value)
<option value="{{ $value }}" @selected(old('pegi_rating') == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">CERO Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="cero_rating">
<option></option>
@php
$ceroRatings = [
1 => 'CERO A',
2 => 'CERO B',
3 => 'CERO C',
4 => 'CERO D',
5 => 'CERO Z'
]
@endphp
@foreach ($ceroRatings as $key => $value)
<option value="{{ $value }}" @selected(old('cero_rating') == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">ACB Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="acb_rating ">
<option></option>
@php
$acbRatings = [
1 => 'E',
2 => 'G',
3 => 'PG',
4 => 'M',
5 => 'MA',
6 => 'MA 15+',
7 => 'R 18+',
8 => 'X 18+'
]
@endphp
@foreach ($acbRatings as $key => $value)
<option value="{{ $value }}" @selected(old('acb_rating') == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Alert-->
<div class="alert alert-primary d-flex align-items-center p-5 mb-5">
<span class="svg-icon svg-icon-2hx svg-icon-primary me-4">
<i class="fal fa-circle-info"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-primary">Hold On!</h4>
<p>Before you submit your game, please ensure you've followed <a href="https://internal.myvideogamelist.com/w/job-guidelines/game-database-administrator/">our guidelines</a>. Thank you!</p>
</div>
</div>
<!--end::Alert-->
<!--begin::Actions-->
<!--begin::Submit button-->
<button type="submit" id="kt_gameList_submit" class="btn btn-primary">
<span class="indicator-label">Submit</span>
<span class="indicator-progress">Please wait...
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
</span>
</button>
<!--end::Submit button-->
<!--end::Actions-->
</form>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,400 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Genre;
use App\Models\Platform;
@endphp
{{-- Check to see if the user is logged in. --}}
@if (Auth::check())
{{-- Check role of user. --}}
@if (
Auth::user()->role_id != 1 &&
Auth::user()->role_id != 2 &&
Auth::user()->role_id != 3
)
{{-- Redirect to home page. --}}
<script>window.location = "/";</script>
@endif
@endif
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Edit Game - {{ $game->name }}</h3>
<div class="card-toolbar">
<button type="button" class="btn btn-light">
<a class="text-dark" href="{{ route('admin.game.clone', $game->id) }}"> <i class="fa-light fa-clone"></i> Clone</a>
</button>
</div>
</div>
<div class="card-body">
@if (count($errors) > 0)
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5 mb-10">
<span class="svg-icon svg-icon-2hx svg-icon-danger me-4">
<i class="fad fa-times-circle"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-danger">Error Editing Game</h4>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
<!--end::Alert-->
@endif
<form class="form w-100" novalidate="novalidate" action="{{ route('admin.game.update', $game) }}" method="post" enctype="multipart/form-data">
@csrf
@method('PUT')
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Name</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="name" value="{{ old('name') ?? $game->name }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Alternative Titles</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="alt_titles" placeholder="Alt Title 1|Alt Title 2|Alt Title3" value="{{ old('alt_titles') ?? $game->alt_titles }}" />
<div class="text-muted mt-1">Please use the pipe character <code>|</code> to separate each alternative title. Do not include any spaces before or after the pipe.</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Platform</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="platform_id">
<option></option>
@php
$platforms = Platform::all()->sortBy('name');
@endphp
@foreach ($platforms as $platform)
<option value="{{ $platform->id }}" @selected($platform->id == $game->platform_id ?? old('platform_id') == $platform->id)>
{{ $platform->name }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-12 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Description</label>
<!--end::Label-->
<!--begin::Input-->
<textarea class="form-control" data-kt-autosize="true" rows="5" name="description">{{ old('description') ?? $game->description }}</textarea>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-8 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Source</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="source" placeholder="https://domain.com" value="{{ old('source') ?? $game->source }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Boxart</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="file" name="boxart" value="" />
<!--end::Input-->
<div class="text-muted mt-1">Boxart images must not be over <code>512kb</code> and must be a <code>JPG/JPEG</code>, <code>GIF</code> or <code>PNG</code> file.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<hr />
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Genres</label>
<!--end::Label-->
<!--begin::Input-->
@php
$genres = Genre::all()->sortBy('name');
@endphp
@foreach ($genres as $genre)
<div class="mb-2">
<div class="form-check form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" name="genre_ids[]" value="{{ $genre->id }}" id="{{ $genre->name }}" @checked(in_array($genre->id, explode(',', $game->genre_ids))) {{ (in_array($genre->id, old('genre_ids', []))) ? "checked" : (in_array($genre->id, explode(',', $game->genre_ids))) }}>
<label class="form-check-label" for="{{ $genre->name }}">
{{ $genre->name }}
</label>
</div>
</div>
@endforeach
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Developer(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="developers" value="{{ old('developers') ?? $game->developers }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple developers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Publishers(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="publishers" value="{{ old('publishers') ?? $game->publishers }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple publishers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Composer(s)</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="composers" value="{{ old('composers') ?? $game->composers }}" />
<!--end::Input-->
<div class="text-muted mt-1">Please ensure this is a comma separated value if there are multiple composers.</div>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Official Website</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="website" placeholder="https://domain.com" value="{{ old('website') ?? $game->website }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">NA Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="na_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('na_release_date') ?? $game->na_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">JP Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="jp_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('jp_release_date') ?? $game->jp_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">EU Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="eu_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('eu_release_date') ?? $game->eu_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">AUS Release Date</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="aus_release_date" placeholder="{{ date('F j, Y') }}" value="{{ old('aus_release_date') ?? $game->aus_release_date }}" />
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">ESRB Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="esrb_rating">
<option></option>
@php
$esrbRatings = [
1 => 'Everyone',
2 => 'Everyone 10+',
3 => 'Teen',
4 => 'Mature 17+',
5 => 'Adults Only 18+',
6 => 'Rating Pending',
7 => 'Rating Pending - Likely Mature 17+'
]
@endphp
@foreach ($esrbRatings as $key => $value)
<option value="{{ $value }}" @selected(old('esrb_rating') ?? $game->esrb_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">PEGI Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="pegi_rating">
<option></option>
@php
$pegiRatings = [
1 => 'PEGI 3',
2 => 'PEGI 7',
3 => 'PEGI 12',
4 => 'PEGI 16',
5 => 'PEGI 18'
]
@endphp
@foreach ($pegiRatings as $key => $value)
<option value="{{ $value }}" @selected(old('pegi_rating') ?? $game->pegi_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">CERO Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="cero_rating">
<option></option>
@php
$ceroRatings = [
1 => 'CERO A',
2 => 'CERO B',
3 => 'CERO C',
4 => 'CERO D',
5 => 'CERO Z'
]
@endphp
@foreach ($ceroRatings as $key => $value)
<option value="{{ $value }}" @selected(old('cero_rating') ?? $game->cero_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">ACB Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="acb_rating">
<option></option>
@php
$acbRatings = [
1 => 'E',
2 => 'G',
3 => 'PG',
4 => 'M',
5 => 'MA',
6 => 'MA 15+',
7 => 'R 18+',
8 => 'X 18+'
]
@endphp
@foreach ($acbRatings as $key => $value)
<option value="{{ $value }}" @selected(old('acb_rating') ?? $game->acb_rating == $value)>
{{ $value }}
</option>
@endforeach
</select>
</div>
<!--end::Input group-->
<!--begin::Alert-->
<div class="alert alert-primary d-flex align-items-center p-5 mb-5">
<span class="svg-icon svg-icon-2hx svg-icon-primary me-4">
<i class="fal fa-circle-info"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-primary">Hold On!</h4>
<p>Before you submit your update, please ensure you've followed <a href="https://internal.myvideogamelist.com/w/job-guidelines/game-database-administrator/">our guidelines</a>. Thank you!</p>
</div>
</div>
<!--end::Alert-->
<!--begin::Actions-->
<!--begin::Submit button-->
<button type="submit" id="kt_gameList_submit" class="btn btn-primary">
<span class="indicator-label">Submit</span>
<span class="indicator-progress">Please wait...
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
</span>
</button>
<!--end::Submit button-->
<!--end::Actions-->
</form>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Current Boxart</h3>
</div>
<div class="card-body">
<div class="d-flex justify-content-center"><img class="img-fluid img-thumbnail" src="{{ Storage::url('assets/boxart/') . $game->boxart }}" alt="image"></div>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,56 @@
@php
use App\Models\Game;
use App\Models\Platform;
@endphp
{{-- Check to see if the user is logged in. --}}
@if (Auth::check())
{{-- Check role of user. --}}
@if (
Auth::user()->role_id != 1 &&
Auth::user()->role_id != 2 &&
Auth::user()->role_id != 3
)
{{-- Redirect to home page. --}}
<script>window.location = "/";</script>
@endif
@endif
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Games</h3>
<div class="card-toolbar">
<div class="input-group">
<input type="text" class="form-control" name="admSearch" id="admSearch" placeholder="Game ID" aria-label="" aria-describedby="">
<button class="input-group-text fw-light" id="searchBtn">Search</button>
</div>
</div>
<script type="text/javascript">
document.getElementById('searchBtn').onclick = function() {
var gameId = document.getElementById("admSearch").value;
location.href = "/admin/game/" + gameId + "/edit";
};
</script>
</div>
<div class="card-body">
@php
$games = Game::take(100)->orderBy('id', 'desc')->get();
@endphp
<ul>
@foreach ($games as $game)
<li><a href="{{ route('admin.game.edit', $game->id) }}">{{ $game->id }} - {{ $game->name }} ({{ $game->platform()->get()[0]->name }})</a></li>
@endforeach
</ul>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,34 @@
@php
use App\Models\User;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Contact Us</h3>
</div>
<div class="card-body">
<p>Coming soon!</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,469 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Genre;
use App\Models\Platform;
// Check to see if the user is logged in.
if (Auth::check()) {
// Check to see if the user has this game on their list already.
$hasGame = GameList::whereUserId(Auth::user()->id)->whereGameId($gameId)->first();
}
// Fetch the game object.
$game = Game::findOrFail($gameId);
// Turn $game->genre_ids into an array.
$genres = explode(',', $game->genre_ids);
// Determine the friendly genre name(s).
$genreNames = [];
foreach ($genres as $genre) {
array_push($genreNames, Genre::whereId($genre)->value('name'));
}
// Create a comma separated string of the genre names.
$genreNames = implode(', ', $genreNames);
// Determine what other platforms this game exists on.
$alsoExistsOn = Game::whereName($game->name)->where('id', '!=', $game->id)->get();
$platforms = [];
if (count($alsoExistsOn) >= 1) {
foreach ($alsoExistsOn as $alsoExistsOnGame) {
array_push($platforms, [
'id' => $alsoExistsOnGame->id,
'name' => Platform::whereId($alsoExistsOnGame->platform_id)->value('name'),
]);
}
}
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">{{ $game->name }}</h3>
<div class="card-toolbar">
<div class="text-grey-900 bg-secondary p-3 rounded">
{{ $game->platform()->get()[0]->name }}
</div>
</div>
</div>
<div class="card-body">
@if (count($errors) > 0)
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5 mb-10">
<span class="svg-icon svg-icon-2hx svg-icon-danger me-4">
<i class="fad fa-times-circle"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-danger">Error Adding Game to List</h4>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
<!--end::Alert-->
@endif
@if ($hasGame)
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5 mb-0">
<span class="svg-icon svg-icon-2hx svg-icon-danger me-4">
<i class="fad fa-times-circle"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-danger">Error Adding Game to List</h4>
<p>You already have this game on your list.</p>
</div>
</div>
<!--end::Alert-->
@else
<form class="form w-100" novalidate="novalidate" action="{{ route('games.list.store') }}" method="post">
@csrf
@isset ($game->alt_titles)
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Display Title</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="name">
<option></option>
@php
$altTitles = explode('|', $game->alt_titles);
@endphp
@foreach ($altTitles as $altTitle)
<option value="{{ $altTitle }}" @selected(old('name') == $altTitle)>
{{ $altTitle }}
</option>
@endforeach
</select>
<div class="text-muted mt-1">The title of the game that will be displayed on your list. If nothing is selected the default title will be used.</div>
<!--end::Input-->
</div>
<!--end::Input group-->
@else
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Name</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" type="text" name="name" value="{{ $game->name }}" disabled/>
<!--end::Input-->
</div>
<!--end::Input group-->
@endisset
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Ownership</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="ownership">
<option></option>
@php
$ownerships = [
1 => 'Played, but don\'t own',
2 => 'Own Digital Copy',
3 => 'Own Retail Version',
4 => 'Own Collectors Edition',
]
@endphp
@foreach ($ownerships as $key => $value)
<option value="{{ $key }}" @selected(old('ownership') == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark required">Status</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" name="status">
<option></option>
@php
$statuses = [
1 => 'Playing',
2 => 'Continuously Playing',
3 => 'Completed',
4 => 'On-Hold',
5 => 'Dropped',
6 => 'Plan to Play',
]
@endphp
@foreach ($statuses as $key => $value)
<option value="{{ $key }}" @selected(old('status') == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="rating">
<option></option>
@php
$ratings = [
1 => '1 (Unplayable)',
2 => '2 (Horrible)',
3 => '3 (Very Bad)',
4 => '4 (Bad)',
5 => '5 (Playable)',
6 => '6 (Fine)',
7 => '7 (Good)',
8 => '8 (Very Good)',
9 => '9 (Great)',
10 => '10 (Masterpiece)',
]
@endphp
@foreach ($ratings as $key => $value)
<option value="{{ $key }}" @selected(old('rating') == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Priority</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="priority">
<option></option>
@php
$priorities = [
1 => 'Low',
2 => 'Medium',
3 => 'High',
]
@endphp
@foreach ($priorities as $key => $value)
<option value="{{ $value }}" @selected(old('priority') == $value)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Difficulty</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="difficulty">
<option></option>
@php
$difficulties = [
1 => 'Easy',
2 => 'Medium',
3 => 'Hard',
4 => 'Extremely Hard',
]
@endphp
@foreach ($difficulties as $key => $value)
<option value="{{ $value }}" @selected(old('difficulty') == $value)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Hours Played</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="hoursPlayed">
<option></option>
@php
$hoursPlayed = [
1 => 'Less than 1 Hour',
2 => '1-2 Hours',
3 => '3-4 Hours',
4 => '5-10 Hours',
5 => '11-20 Hours',
6 => '21-30 Hours',
7 => '31-40 Hours',
8 => '41-50 Hours',
9 => '51-75 Hours',
10 => '76-100 Hours',
11 => '101-200 Hours',
12 => '201-500 Hours',
13 => '501+ Hours',
]
@endphp
@foreach ($hoursPlayed as $key => $value)
<option value="{{ $key }}" @selected(old('hoursPlayed') == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Start Date</label>
<!--end::Label-->
<!--begin::Input-->
<div class="input-group mb-5">
<span class="input-group-text" id="basic-addon1"><i class="fal fa-calendar-day"></i></span>
<input class="form-control" placeholder="Pick a date" id="kt_datepicker_start" type="text" name="start_date" value="" />
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Finish Date</label>
<!--end::Label-->
<!--begin::Input-->
<div class="input-group mb-5">
<span class="input-group-text" id="basic-addon1"><i class="fal fa-calendar-day"></i></span>
<input class="form-control" placeholder="Pick a date" id="kt_datepicker_finish" type="text" name="finish_date" value="" />
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Replay Value</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="replayValue">
<option></option>
<option value="1">Very Low</option>
<option value="2">Low</option>
<option value="3">Medium</option>
<option value="4">High</option>
<option value="5">Very High</option>
@endphp
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-12 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Notes</label>
<!--end::Label-->
<!--begin::Input-->
<textarea class="form-control" data-kt-autosize="true" rows="5" name="notes">{{ old('notes') }}</textarea>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Input-->
<div class="form-check form-switch form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" name="isReplaying" value="1" id="isReplaying"/>
<label class="form-check-label" for="isReplaying">Are You Replaying This Game?</label>
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input-->
<input type="hidden" name="gameId" value="{{ $game->id }}" />
<!--end::Input-->
<!--begin::Actions-->
<!--begin::Submit button-->
<button type="submit" id="kt_gameList_submit" class="btn btn-primary">
<span class="indicator-label">Submit</span>
<span class="indicator-progress">Please wait...
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
</span>
</button>
<!--end::Submit button-->
<!--end::Actions-->
</form>
@endif
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Game Information</h3>
</div>
<div class="card-body">
<div class="d-flex justify-content-center"><img class="img-fluid img-thumbnail" src="{{ Storage::url('assets/boxart/') . $game->boxart }}" alt="image"></div>
<dl class="row mt-5">
@if ($game->alt_titles)
@php
$altTitles = str_replace('|', ', ', $game->alt_titles);
@endphp
<dt class="col-sm-5 fw-bolder">Alternative Titles</dt>
<dd class="col-sm-7">{{ $altTitles }}</dd>
@endif
<dt class="col-sm-5 fw-bolder">Platform</dt>
<dd class="col-sm-7">{{ $game->platform()->get()[0]->name }}</dd>
<dt class="col-sm-5 fw-bolder">Developer(s)</dt>
<dd class="col-sm-7">{{ $game->developers ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Publishers(s)</dt>
<dd class="col-sm-7">{{ $game->publishers ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Genres(s)</dt>
<dd class="col-sm-7">{{ $genreNames }}</dd>
@if ($game->na_release_date)
<dt class="col-sm-5 fw-bolder">NA Release Date</dt>
<dd class="col-sm-7">{{ $game->na_release_date }}</dd>
@endif
@if ($game->jp_release_date)
<dt class="col-sm-5 fw-bolder">JP Release Date</dt>
<dd class="col-sm-7">{{ $game->jp_release_date }}</dd>
@endif
@if ($game->eu_release_date)
<dt class="col-sm-5 fw-bolder">EU Release Date</dt>
<dd class="col-sm-7">{{ $game->eu_release_date }}</dd>
@endif
@if ($game->aus_release_date)
<dt class="col-sm-5 fw-bolder">AUS Release Date</dt>
<dd class="col-sm-7">{{ $game->aus_release_date }}</dd>
@endif
@if ($game->esrb_rating)
<dt class="col-sm-5 fw-bolder">ESRB Rating</dt>
<dd class="col-sm-7">{{ $game->esrb_rating ?? '-' }}</dd>
@endif
@if ($game->pegi_rating)
<dt class="col-sm-5 fw-bolder">PEGI Rating</dt>
<dd class="col-sm-7">{{ $game->pegi_rating ?? '-' }}</dd>
@endif
@if ($game->cero_rating)
<dt class="col-sm-5 fw-bolder">CERO Rating</dt>
<dd class="col-sm-7">{{ $game->cero_rating ?? '-' }}</dd>
@endif
@if ($game->acb_rating)
<dt class="col-sm-5 fw-bolder">ACB Rating</dt>
<dd class="col-sm-7">{{ $game->acb_rating ?? '-' }}</dd>
@endif
<dt class="col-sm-5 fw-bolder">MVGL User Score</dt>
<dd class="col-sm-7">{{ (round(GameList::whereGameId($game->id)->avg('rating'), 1)) != 0 ? round(GameList::whereGameId($game->id)->avg('rating'), 1) : '-'}} {{ (GameList::whereGameId($game->id)->where('rating', '>=', 1)->count()) != 0 ? ' by ' . GameList::whereGameId($game->id)->where('rating', '>=', 1)->count() . ' user(s) ' : '' }}</dd>
<dt class="col-sm-5 fw-bolder">MVGL Difficulty</dt>
<dd class="col-sm-7">{{ GameList::whereGameId($game->id)->avg('difficulty') ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Composer(s)</dt>
<dd class="col-sm-7">{{ $game->composers ?? '-'}}</dd>
@if ($game->website)
<dt class="col-sm-5 fw-bolder">Website</dt>
<dd class="col-sm-7"><a href="{{ $game->website }}">Official Website</a></dd>
@endif
<dt class="col-sm-5 fw-bolder">Added by</dt>
<dd class="col-sm-7">{{ GameList::whereGameId($game->id)->count() ?? '0' }} User(s)</dd>
</dl>
<p class="lh-lg">This game also exists on:<br />
@foreach ($platforms as $platform)
<a class="mt-1" href="/game/{{ $platform['id'] }}"><span class="badge badge-primary">{{ $platform['name'] }}</span></a>
@endforeach
</p>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,488 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Genre;
use App\Models\Platform;
// Check to see if the user is logged in.
if (Auth::check()) {
// Check to see if the user has this game on their list already.
$hasGame = GameList::whereUserId(Auth::user()->id)->whereGameId($gameList->game_id)->first();
}
// Fetch the game object.
$game = Game::findOrFail($gameList->game_id);
// Turn $game->genre_ids into an array.
$genres = explode(',', $game->genre_ids);
// Determine the friendly genre name(s).
$genreNames = [];
foreach ($genres as $genre) {
array_push($genreNames, Genre::whereId($genre)->value('name'));
}
// Create a comma separated string of the genre names.
$genreNames = implode(', ', $genreNames);
// Determine what other platforms this game exists on.
$alsoExistsOn = Game::whereName($game->name)->where('id', '!=', $game->id)->get();
$platforms = [];
if (count($alsoExistsOn) >= 1) {
foreach ($alsoExistsOn as $alsoExistsOnGame) {
array_push($platforms, [
'id' => $alsoExistsOnGame->id,
'name' => Platform::whereId($alsoExistsOnGame->platform_id)->value('name'),
]);
}
}
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">{{ $game->name }}</h3>
<div class="card-toolbar">
<div class="text-light-primary bg-primary p-3 rounded">
{{ $game->platform()->get()[0]->name }}
</div>
</div>
</div>
<div class="card-body">
@if (count($errors) > 0)
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5 mb-10">
<span class="svg-icon svg-icon-2hx svg-icon-danger me-4">
<i class="fad fa-times-circle"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-danger">Error Editing List Entry</h4>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
<!--end::Alert-->
@endif
@if (!$hasGame)
<!--begin::Alert-->
<div class="alert alert-danger d-flex align-items-center p-5 mb-0">
<span class="svg-icon svg-icon-2hx svg-icon-danger me-4">
<i class="fad fa-times-circle"></i>
</span>
<div class="d-flex flex-column">
<h4 class="mb-1 text-danger">Error Editing List Entry</h4>
<p>You do not appear to have this game on your list.</p>
</div>
</div>
<!--end::Alert-->
@else
<form class="form w-100" novalidate="novalidate" action="{{ route('games.list.update', $gameList) }}" method="POST">
@csrf
@method('PUT')
@isset ($game->alt_titles)
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Display Title</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="name">
<option></option>
@php
$altTitles = explode('|', $game->alt_titles);
@endphp
@foreach ($altTitles as $altTitle)
<option value="{{ $altTitle }}" @selected(old('name') ?? $gameList->name == $altTitle)>
{{ $altTitle }}
</option>
@endforeach
</select>
<div class="text-muted mt-1">The title of the game that will be displayed on your list. If nothing is selected the default title will be used.</div>
<!--end::Input-->
</div>
<!--end::Input group-->
@else
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Name</label>
<!--end::Label-->
<!--begin::Input-->
<input class="form-control" name="name" value="{{ $game->name }}" disabled/>
<!--end::Input-->
</div>
<!--end::Input group-->
@endisset
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Ownership</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="ownership">
<option></option>
@php
$ownerships = [
1 => 'Played, but don\'t own',
2 => 'Own Digital Copy',
3 => 'Own Retail Version',
4 => 'Own Collectors Edition',
]
@endphp
@foreach ($ownerships as $key => $value)
<option value="{{ $key }}" @selected(old('ownership') ?? $gameList->ownership == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark required">Status</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" name="status">
<option></option>
@php
$statuses = [
1 => 'Playing',
2 => 'Continuously Playing',
3 => 'Completed',
4 => 'On-Hold',
5 => 'Dropped',
6 => 'Plan to Play',
]
@endphp
@foreach ($statuses as $key => $value)
<option value="{{ $key }}" @selected(old('status') ?? $gameList->status == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Rating</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="rating">
<option></option>
@php
$ratings = [
1 => '1 (Unplayable)',
2 => '2 (Horrible)',
3 => '3 (Very Bad)',
4 => '4 (Bad)',
5 => '5 (Playable)',
6 => '6 (Fine)',
7 => '7 (Good)',
8 => '8 (Very Good)',
9 => '9 (Great)',
10 => '10 (Masterpiece)',
]
@endphp
@foreach ($ratings as $key => $value)
<option value="{{ $key }}" @selected(old('rating') ?? $gameList->rating == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Priority</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="priority">
<option></option>
@php
$priorities = [
1 => 'Low',
2 => 'Medium',
3 => 'High',
]
@endphp
@foreach ($priorities as $key => $value)
<option value="{{ $value }}" @selected(old('priority') ?? $gameList->priority == $value)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Difficulty</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="difficulty">
<option></option>
@php
$difficulties = [
1 => 'Easy',
2 => 'Medium',
3 => 'Hard',
4 => 'Extremely Hard',
]
@endphp
@foreach ($difficulties as $key => $value)
<option value="{{ $value }}" @selected(old('difficulty') ?? $gameList->difficulty == $value)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Hours Played</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="hoursPlayed">
<option></option>
@php
$hoursPlayed = [
1 => 'Less than 1 Hour',
2 => '1-2 Hours',
3 => '3-4 Hours',
4 => '5-10 Hours',
5 => '11-20 Hours',
6 => '21-30 Hours',
7 => '31-40 Hours',
8 => '41-50 Hours',
9 => '51-75 Hours',
10 => '76-100 Hours',
11 => '101-200 Hours',
12 => '201-500 Hours',
13 => '501+ Hours',
]
@endphp
@foreach ($hoursPlayed as $key => $value)
<option value="{{ $key }}" @selected(old('hoursPlayed') ?? $gameList->hours_played == $key)>
{{ $value }}
</option>
@endforeach
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Start Date</label>
<!--end::Label-->
<!--begin::Input-->
<div class="input-group mb-5">
<span class="input-group-text" id="basic-addon1"><i class="fal fa-calendar-day"></i></span>
<input class="form-control" placeholder="Pick a date" id="kt_datepicker_start" name="start_date" value="{{ $gameList->start_date }}" />
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Finish Date</label>
<!--end::Label-->
<!--begin::Input-->
<div class="input-group mb-5">
<span class="input-group-text" id="basic-addon1"><i class="fal fa-calendar-day"></i></span>
<input class="form-control" placeholder="Pick a date" id="kt_datepicker_finish" name="finish_date" value="{{ $gameList->finish_date }}" />
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
@if ($gameList->status == 3)
<div class="fv-row col-md-6 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Replay Value</label>
<!--end::Label-->
<!--begin::Input-->
<select class="form-select" data-control="select2" data-placeholder="Select an option" data-allow-clear="true" name="replayValue">
<option></option>
@php
$replayValues = [
1 => 'Very Low',
2 => 'Low',
3 => 'Medium',
4 => 'High',
5 => 'Very High',
]
@endphp
@foreach ($replayValues as $key => $value)
<option value="{{ $key }}" @selected(old('replayValue') ?? $gameList->replay_value == $key)>
{{ $value }}
</option>
@endforeach
@endphp
</select>
<!--end::Input-->
</div>
<!--end::Input group-->
@endif
<!--begin::Input group-->
<div class="fv-row col-md-12 mb-5">
<!--begin::Label-->
<label class="form-label fs-6 fw-bolder text-dark">Notes</label>
<!--end::Label-->
<!--begin::Input-->
<textarea class="form-control" data-kt-autosize="true" rows="5" name="notes">{{ $gameList->notes ?? '' }}</textarea>
<!--end::Input-->
</div>
<!--end::Input group-->
<!--begin::Input group-->
@if ($gameList->status == 3)
<div class="fv-row col-md-6 mb-10">
<!--begin::Input-->
<div class="form-check form-switch form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" name="isReplaying" value="1" id="isReplaying" @checked(old('isReplaying') ?? $gameList->is_replaying == 'Y') />
<label class="form-check-label" for="isReplaying">Are You Replaying This Game?</label>
</div>
<!--end::Input-->
</div>
<!--end::Input group-->
@endif
<!--begin::Actions-->
<div class="d-flex justify-content-between">
<!--begin::Submit button-->
<button type="submit" id="kt_gameList_submit" class="btn btn-primary">
<span class="indicator-label">Submit</span>
<span class="indicator-progress">Please wait...
<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
</button>
<!--end::Submit button-->
</form>
<!--begin::Delete button-->
<form class="d-inline m-0" method="POST" action="{{ route('games.list.destroy', $gameList) }}">
@method('DELETE')
@csrf
<a class="btn btn-danger" href="#" onclick="event.preventDefault(); this.closest('form').submit();">Delete</a>
</form>
<!--end::Delete button-->
</div>
<!--end::Actions-->
@endif
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Game Information</h3>
</div>
<div class="card-body">
<div class="d-flex justify-content-center"><img class="img-fluid img-thumbnail" src="{{ Storage::url('assets/boxart/') . $game->boxart }}" alt="image"></div>
<dl class="row mt-5">
@if ($game->alt_titles)
@php
$altTitles = str_replace('|', ', ', $game->alt_titles);
@endphp
<dt class="col-sm-5 fw-bolder">Alternative Titles</dt>
<dd class="col-sm-7">{{ $altTitles }}</dd>
@endif
<dt class="col-sm-5 fw-bolder">Platform</dt>
<dd class="col-sm-7">{{ $game->platform()->get()[0]->name }}</dd>
<dt class="col-sm-5 fw-bolder">Developer(s)</dt>
<dd class="col-sm-7">{{ $game->developers ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Publishers(s)</dt>
<dd class="col-sm-7">{{ $game->publishers ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Genres(s)</dt>
<dd class="col-sm-7">{{ $genreNames }}</dd>
@if ($game->na_release_date)
<dt class="col-sm-5 fw-bolder">NA Release Date</dt>
<dd class="col-sm-7">{{ $game->na_release_date }}</dd>
@endif
@if ($game->jp_release_date)
<dt class="col-sm-5 fw-bolder">JP Release Date</dt>
<dd class="col-sm-7">{{ $game->jp_release_date }}</dd>
@endif
@if ($game->eu_release_date)
<dt class="col-sm-5 fw-bolder">EU Release Date</dt>
<dd class="col-sm-7">{{ $game->eu_release_date }}</dd>
@endif
@if ($game->aus_release_date)
<dt class="col-sm-5 fw-bolder">AUS Release Date</dt>
<dd class="col-sm-7">{{ $game->aus_release_date }}</dd>
@endif
@if ($game->esrb_rating)
<dt class="col-sm-5 fw-bolder">ESRB Rating</dt>
<dd class="col-sm-7">{{ $game->esrb_rating ?? '-' }}</dd>
@endif
@if ($game->pegi_rating)
<dt class="col-sm-5 fw-bolder">PEGI Rating</dt>
<dd class="col-sm-7">{{ $game->pegi_rating ?? '-' }}</dd>
@endif
@if ($game->cero_rating)
<dt class="col-sm-5 fw-bolder">CERO Rating</dt>
<dd class="col-sm-7">{{ $game->cero_rating ?? '-' }}</dd>
@endif
@if ($game->acb_rating)
<dt class="col-sm-5 fw-bolder">ACB Rating</dt>
<dd class="col-sm-7">{{ $game->acb_rating ?? '-' }}</dd>
@endif
<dt class="col-sm-5 fw-bolder">MVGL User Score</dt>
<dd class="col-sm-7">{{ (round(GameList::whereGameId($game->id)->avg('rating'), 1)) != 0 ? round(GameList::whereGameId($game->id)->avg('rating'), 1) : '-'}} {{ (GameList::whereGameId($game->id)->where('rating', '>=', 1)->count()) != 0 ? ' by ' . GameList::whereGameId($game->id)->where('rating', '>=', 1)->count() . ' user(s) ' : '' }}</dd>
<dt class="col-sm-5 fw-bolder">MVGL Difficulty</dt>
<dd class="col-sm-7">{{ GameList::whereGameId($game->id)->avg('difficulty') ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Composer(s)</dt>
<dd class="col-sm-7">{{ $game->composers ?? '-'}}</dd>
@if ($game->website)
<dt class="col-sm-5 fw-bolder">Website</dt>
<dd class="col-sm-7"><a href="{{ $game->website }}">Official Website</a></dd>
@endif
<dt class="col-sm-5 fw-bolder">Added by</dt>
<dd class="col-sm-7">{{ GameList::whereGameId($game->id)->count() ?? '0' }} User(s)</dd>
</dl>
<p class="lh-lg">This game also exists on:<br />
@foreach ($platforms as $platform)
<a class="mt-1" href="/game/{{ $platform['id'] }}"><span class="badge badge-primary">{{ $platform['name'] }}</span></a>
@endforeach
</p>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,37 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\User;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Game Reviews</h3>
</div>
<div class="card-body">
<p>Coming soon!</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,227 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Genre;
use App\Models\Platform;
// Turn $game->genre_ids into an array.
$genres = explode(',', $game->genre_ids);
// Determine the friendly genre name(s).
$genreNames = [];
foreach ($genres as $genre) {
array_push($genreNames, Genre::whereId($genre)->value('name'));
}
// Create a comma separated string of the genre names.
$genreNames = implode(', ', $genreNames);
// Determine what other platforms this game exists on.
$alsoExistsOn = Game::whereName($game->name)->where('id', '!=', $game->id)->get();
$platforms = [];
if (count($alsoExistsOn) >= 1) {
foreach ($alsoExistsOn as $alsoExistsOnGame) {
array_push($platforms, [
'id' => $alsoExistsOnGame->id,
'name' => Platform::whereId($alsoExistsOnGame->platform_id)->value('name'),
]);
}
}
@endphp
{{-- Check to see if the user is logged in. --}}
@if (Auth::check())
{{-- Check to see if the user has this game on their list already. --}}
@php
$hasGame = GameList::whereUserId(Auth::user()->id)->whereGameId($game->id)->first();
@endphp
{{-- Check to see if the user has this game favorited already. --}}
{{-- Check to see if the user has this wishlisted already. --}}
@endif
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">{{ $game->name }}</h3>
@if (Auth::check())
<div class="card-toolbar">
<!--begin::Menu wrapper-->
<div>
<!--begin::Toggle-->
<button type="button" class="btn btn-secondary btn-sm rotate" data-kt-menu-trigger="click" data-kt-menu-placement="bottom-start" data-kt-menu-offset="30px, 30px">
Actions
<i class="fas fa-angle-down rotate-180 ms-3 me-0"></i>
</button>
<!--end::Toggle-->
<!--begin::Menu-->
<div class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-800 menu-state-bg-light-primary fw-bold w-200px py-4" data-kt-menu="true">
<!--begin::Menu item-->
<div class="menu-item px-3 my-1">
@if ($hasGame)
<a href="{{ route('games.list.edit', $hasGame) }}" class="menu-link px-3">Edit List Entry</a>
@else
<a href="{{ route('games.list.create', ['gameId' => $game->id]) }}" class="menu-link px-3">
Add to List
</a>
@endif
</div>
<!--end::Menu item-->
<!--begin::Menu item-->
{{-- <div class="menu-item px-3 my-1">
<a href="#" class="menu-link px-3 disabled">
Add to Favorites
</a>
</div> --}}
<!--end::Menu item-->
<!--begin::Menu item-->
{{-- <div class="menu-item px-3 my-1">
<a href="#" class="menu-link px-3 disabled">
Add to Wishlist
</a>
</div> --}}
<!--end::Menu item-->
<!--begin::Menu item-->
{{-- <div class="menu-item px-3 my-1">
<a href="#" class="menu-link px-3 disabled">
Write a Review
</a>
</div> --}}
<!--end::Menu item-->
</div>
<!--end::Menu-->
</div>
<!--end::Dropdown wrapper-->
</div>
</div>
@else
</div>
@endif
<div class="card-body">
{!! Markdown::parse($game->description) !!}
@if ($game->source)
<p class="mb-0"><a href="{{ $game->source }}" target="_blank">Source</a>.</p>
@endif
</div>
</div>
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title">Comments</h3>
</div>
<div class="card-body">
<p class="mb-0">Coming soon...</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Game Information</h3>
</div>
<div class="card-body">
<div class="d-flex justify-content-center"><img class="img-fluid img-thumbnail" src="{{ Storage::url('assets/boxart/') . $game->boxart }}" alt="image"></div>
<dl class="row mt-5">
@if ($game->alt_titles)
@php
$altTitles = str_replace('|', ', ', $game->alt_titles);
@endphp
<dt class="col-sm-5 fw-bolder">Alternative Titles</dt>
<dd class="col-sm-7">{{ $altTitles }}</dd>
@endif
<dt class="col-sm-5 fw-bolder">Platform</dt>
<dd class="col-sm-7">{{ $game->platform()->get()[0]->name }}</dd>
<dt class="col-sm-5 fw-bolder">Developer(s)</dt>
<dd class="col-sm-7">{{ $game->developers ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Publishers(s)</dt>
<dd class="col-sm-7">{{ $game->publishers ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Genres(s)</dt>
<dd class="col-sm-7">{{ $genreNames }}</dd>
@if ($game->na_release_date)
<dt class="col-sm-5 fw-bolder">NA Release Date</dt>
<dd class="col-sm-7">{{ $game->na_release_date }}</dd>
@endif
@if ($game->jp_release_date)
<dt class="col-sm-5 fw-bolder">JP Release Date</dt>
<dd class="col-sm-7">{{ $game->jp_release_date }}</dd>
@endif
@if ($game->eu_release_date)
<dt class="col-sm-5 fw-bolder">EU Release Date</dt>
<dd class="col-sm-7">{{ $game->eu_release_date }}</dd>
@endif
@if ($game->aus_release_date)
<dt class="col-sm-5 fw-bolder">AUS Release Date</dt>
<dd class="col-sm-7">{{ $game->aus_release_date }}</dd>
@endif
@if ($game->esrb_rating)
<dt class="col-sm-5 fw-bolder">ESRB Rating</dt>
<dd class="col-sm-7">{{ $game->esrb_rating ?? '-' }}</dd>
@endif
@if ($game->pegi_rating)
<dt class="col-sm-5 fw-bolder">PEGI Rating</dt>
<dd class="col-sm-7">{{ $game->pegi_rating ?? '-' }}</dd>
@endif
@if ($game->cero_rating)
<dt class="col-sm-5 fw-bolder">CERO Rating</dt>
<dd class="col-sm-7">{{ $game->cero_rating ?? '-' }}</dd>
@endif
@if ($game->acb_rating)
<dt class="col-sm-5 fw-bolder">ACB Rating</dt>
<dd class="col-sm-7">{{ $game->acb_rating ?? '-' }}</dd>
@endif
<dt class="col-sm-5 fw-bolder">MVGL User Score</dt>
<dd class="col-sm-7">{{ (round(GameList::whereGameId($game->id)->avg('rating'), 1)) != 0 ? round(GameList::whereGameId($game->id)->avg('rating'), 1) : '-'}} {{ (GameList::whereGameId($game->id)->where('rating', '>=', 1)->count()) != 0 ? ' by ' . GameList::whereGameId($game->id)->where('rating', '>=', 1)->count() . ' user(s) ' : '' }}</dd>
<dt class="col-sm-5 fw-bolder">MVGL Difficulty</dt>
<dd class="col-sm-7">{{ GameList::whereGameId($game->id)->avg('difficulty') ?? '-' }}</dd>
<dt class="col-sm-5 fw-bolder">Composer(s)</dt>
<dd class="col-sm-7">{{ $game->composers ?? '-' }}</dd>
@if ($game->website)
<dt class="col-sm-5 fw-bolder">Website</dt>
<dd class="col-sm-7"><a href="{{ $game->website }}">Official Website</a></dd>
@endif
<dt class="col-sm-5 fw-bolder">Added by</dt>
<dd class="col-sm-7">{{ GameList::whereGameId($game->id)->count() ?? '0' }} User(s)</dd>
</dl>
@if (count($alsoExistsOn) >= 1)
<p class="lh-lg">This game also exists on:<br />
@foreach ($platforms as $platform)
<a class="mt-1" href="/game/{{ $platform['id'] }}/{{ str_replace('/', '_', str_replace(' ', '_', $game->name)) }}"><span class="badge badge-primary">{{ $platform['name'] }}</span></a>
@endforeach
</p>
@endif
</div>
</div>
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Recently Completed By</h3>
</div>
<div class="card-body">
<p class="mb-0">Coming soon...</p>
</div>
</div>
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title">Recently Favorited By</h3>
</div>
<div class="card-body">
<p class="mb-0">Coming soon...</p>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,49 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\User;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
@if (!Auth::check())
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Welcome to MyVideoGameList!</h3>
</div>
<div class="card-body">
<p>Not a member? We'd love to have you join our community. On MyVideoGameList you can create your own profile, keep track of your video games, meet new friends, and even write reviews on your favorite games (or even for games you hated). We currently have <span class="fw-bolder">{{ number_format(User::count()) }} members</span>, and <span class="fw-bolder">{{ number_format(Game::count()) }} games</span> in our database!<br />
<br />
So what are you waiting for? Registration is free and only takes a few seconds! If you love video games, keeping things organized and making some new friends then come join our community! Click on the avatar of the ghost in the upper right corner to sign in or sign up!
</p>
</div>
</div>
@endif
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title">Changelog</h3>
</div>
<div class="card-body">
<p class="mb-0"><span class="fw-bolder">2022-05-27 -</span> We have pushed our first release of the new website into production. With this release we wanted to ensure the basics are working. This includes signing in, signing out, registering a new account, profiles, searching for games, adding games to your list and being able to edit games on your list are working. If you come across any issues please let us know - <a href="https://support.myvideogamelist.com/servicedesk/customer/portal/1">submit a ticket</a> or <a href="https://discord.gg/9b4ZZwx">connect with us on Discord</a>! We'll be continuing to fix any found issues as well as adding in features and functionality that existed on the old website over time.</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,36 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\User;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Newly Added Games</h3>
</div>
<div class="card-body">
<p>Coming soon!</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,36 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\User;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Recent Gamer Updates</h3>
</div>
<div class="card-body">
<p>Coming soon!</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,34 @@
@php
use App\Models\Platform;
$platforms = Platform::all()->sortBy('name');
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Platforms</h3>
</div>
<div class="card-body">
<ul>
@foreach ($platforms as $platform)
@php
$platformName = str_replace('/', '_', str_replace(' ', '_', $platform->name));
@endphp
<li><a href="{{ route('platform.show', $platformName) }}">{{ $platform->name }}</a></li>
@endforeach
</ul>
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,106 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Platform;
use Illuminate\Support\Str;
$games = Game::wherePlatformId($platform->id)->orderBy('created_at', 'DESC')->paginate(25);
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">{{ $platform->name }}</h3>
</div>
<div class="card-body">
@foreach ($games as $game)
@php
$gameName = str_replace('/', '_', str_replace(' ', '_', $game->name));
$averageRating = round(GameList::whereGameId($game->id)->avg('rating') * 2) / 2;
@endphp
<!--begin::Game-->
<div class="d-flex align-items-start flex-grow-1">
<!--begin::Boxart-->
<div class="me-5">
<img class="mw-125px img-thumbnail" src="{{ Storage::url('assets/boxart/') . $game->boxart }}" alt="">
</div>
<!--end::Boxart-->
<!--begin::Info-->
<div class="d-flex flex-column">
<a href="/game/{{ $game->id }}/{{ $gameName }}" class="text-primary-900 text-hover-primary-600 fs-3 fw-bolder">{{ $game->name }}</a>
@if ($game->alt_titles)
@php
$altTitles = str_replace('|', ', ', $game->alt_titles);
@endphp
<span class="text-dark"><span class="fw-bolder">Alternative Titles:</span> {{ $altTitles }}</span>
@endif
<div class="rating">
@php
while ($averageRating > 0) {
if ($averageRating == 0.5) {
echo '<div class="rating-label me-2 checked">
<i class="fas fa-star-half text-warning"></i>
</div>';
$averageRating = $averageRating - 0.5;
} else {
echo '<div class="rating-label me-2 checked">
<i class="fas fa-star text-warning fs-6"></i>
</div>';
$averageRating--;
}
}
@endphp
</div>
<p class="text-gray-800 fw-normal mb-5">{{ Str::words($game->description, 50) }}</p>
{{-- <div class="d-flex align-items-center mb-5">
<div class="btn btn-sm btn-light btn-color-muted btn-active-light-primary px-4 py-2 me-4">
<!--begin::Svg Icon | path: icons/duotune/communication/com012.svg-->
<span class="svg-icon svg-icon-3">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path opacity="0.3" d="M20 3H4C2.89543 3 2 3.89543 2 5V16C2 17.1046 2.89543 18 4 18H4.5C5.05228 18 5.5 18.4477 5.5 19V21.5052C5.5 22.1441 6.21212 22.5253 6.74376 22.1708L11.4885 19.0077C12.4741 18.3506 13.6321 18 14.8167 18H20C21.1046 18 22 17.1046 22 16V5C22 3.89543 21.1046 3 20 3Z" fill="currentColor"></path>
<rect x="6" y="12" width="7" height="2" rx="1" fill="currentColor"></rect>
<rect x="6" y="7" width="12" height="2" rx="1" fill="currentColor"></rect>
</svg>
</span>
<!--end::Svg Icon-->120</div>
<div class="btn btn-sm btn-light btn-color-muted btn-active-light-danger px-4 py-2">
<!--begin::Svg Icon | path: icons/duotune/general/gen030.svg-->
<span class="svg-icon svg-icon-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M18.3721 4.65439C17.6415 4.23815 16.8052 4 15.9142 4C14.3444 4 12.9339 4.73924 12.003 5.89633C11.0657 4.73913 9.66 4 8.08626 4C7.19611 4 6.35789 4.23746 5.62804 4.65439C4.06148 5.54462 3 7.26056 3 9.24232C3 9.81001 3.08941 10.3491 3.25153 10.8593C4.12155 14.9013 9.69287 20 12.0034 20C14.2502 20 19.875 14.9013 20.7488 10.8593C20.9109 10.3491 21 9.81001 21 9.24232C21.0007 7.26056 19.9383 5.54462 18.3721 4.65439Z" fill="currentColor"></path>
</svg>
</span>
<!--end::Svg Icon-->15</div>
</div> --}}
</div>
<!--end::Info-->
</div>
<!--end::Game-->
<div class="separator my-5"></div>
@endforeach
<div class="d-flex justify-content-center">
{{ $games->links('partials.general._pagination') }}
</div>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,59 @@
@php
$client = new JoyPixels\Client(new JoyPixels\Ruleset());
$client->ascii = true;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title">Privacy Policy</h3>
</div>
<div class="card-body">
<h4>Website Visitors</h4>
<p>Like most website operators, MyVideoGameList collects non-personally-identifying information of the sort that web browsers and servers typically make available, such as the browser type, language preference, referring site, and the date and time of each visitor request. MyVideoGameList's purpose in collecting non-personally identifying information is to better understand how MyVideoGameList's visitors use its website. From time to time, MyVideoGameList may release non-personally-identifying information in the aggregate, e.g., by publishing a report on trends in the usage of its website.<br />
<br />
MyVideoGameList also collects potentially personally-identifying information like Internet Protocol (IP) addresses for logged in users and for users leaving comments on MyVideoGameList.com accounts and games. MyVideoGameList only discloses logged in user and commenter IP addresses under the same circumstances that it uses and discloses personally-identifying information as described below, except that commenter IP addresses are visible and disclosed to the administrators of the site where the comment was left.</p>
<h4>Gathering of Personally-Identifying Information</h4>
<p>Certain visitors to MyVideoGameList's websites choose to interact with MyVideoGameList in ways that require MyVideoGameList to gather personally-identifying information. The amount and type of information that MyVideoGameList gathers depends on the nature of the interaction. For example, we ask visitors who sign up for an account at MyVideoGameList.com to provide a username and email address. In each case, MyVideoGameList collects such information only insofar as is necessary or appropriate to fulfill the purpose of the visitor's interaction with MyVideoGameList. MyVideoGameList does not disclose personally-identifying information other than as described below. And visitors can always refuse to supply personally-identifying information, with the caveat that it may prevent them from engaging in certain website-related activities.</p>
<h4>Aggregated Statistics</h4>
<p>MyVideoGameList may collect statistics about the behavior of visitors to its websites. For instance, MyVideoGameList may monitor the most popular accounts and lists on the MyVideoGameList.com site. MyVideoGameList may display this information publicly or provide it to others. However, MyVideoGameList does not disclose personally-identifying information other than as described below.</p>
<h4>Protection of Certain Personally-Identifying Information</h4>
<p>MyVideoGameList discloses potentially personally-identifying and personally-identifying information only to those of its employees, contractors and affiliated organizations that</p>
<ul style="list-style-type: lower-roman;">
<li>need to know that information in order to process it on MyVideoGameList's behalf or to provide services available at MyVideoGameList's websites, and</li>
<li>that have agreed not to disclose it to others.</li>
</ul>
<p>Some of those employees, contractors and affiliated organizations may be located outside of your home country; by using MyVideoGameList's websites, you consent to the transfer of such information to them. MyVideoGameList will not rent or sell potentially personally-identifying and personally-identifying information to anyone. Other than to its employees, contractors and affiliated organizations, as described above, MyVideoGameList discloses potentially personally-identifying and personally-identifying information only in response to a subpoena, court order or other governmental request, or when MyVideoGameList believes in good faith that disclosure is reasonably necessary to protect the property or rights of MyVideoGameList, third parties or the public at large. If you are a registered user of an MyVideoGameList website and have supplied your email address, MyVideoGameList may occasionally send you an email to tell you about new features, solicit your feedback, or just keep you up to date with what's going on with MyVideoGameList and our products. We primarily use our various product blogs to communicate this type of information, so we expect to keep this type of email to a minimum. If you send us a request (for example via a support email or via one of our feedback mechanisms), we reserve the right to publish it in order to help us clarify or respond to your request or to help us support other users. MyVideoGameList takes all measures reasonably necessary to protect against the unauthorized access, use, alteration or destruction of potentially personally-identifying and personally-identifying information.</p>
<h4>Cookies</h4>
<p>A cookie is a string of information that a website stores on a visitor's computer, and that the visitor's browser provides to the website each time the visitor returns. MyVideoGameList uses cookies to help MyVideoGameList identify and track visitors, their usage of MyVideoGameList website, and their website access preferences. MyVideoGameList visitors who do not wish to have cookies placed on their computers should set their browsers to refuse cookies before using MyVideoGameList's websites, with the drawback that certain features of MyVideoGameList's websites may not function properly without the aid of cookies.</p>
<h4>Business Transfers</h4>
<p>If MyVideoGameList, or substantially all of its assets were acquired, or in the unlikely event that MyVideoGameList goes out of business or enters bankruptcy, user information would be one of the assets that is transferred or acquired by a third party. You acknowledge that such transfers may occur, and that any acquiror of MyVideoGameList may continue to use your personal information as set forth in this policy.</p>
<h4>Ads</h4>
<p>Ads appearing on any of our websites may be delivered to users by advertising partners, who may set cookies. These cookies allow the ad server to recognize your computer each time they send you an online advertisement to compile information about you or others who use your computer. This information allows ad networks to, among other things, deliver targeted advertisements that they believe will be of most interest to you. This Privacy Policy covers the use of cookies by MyVideoGameList and does not cover the use of cookies by any advertisers.</p>
<h4>Privacy Policy Changes</h4>
<p>Although most changes are likely to be minor, MyVideoGameList may change its Privacy Policy from time to time, and in MyVideoGameList's sole discretion. MyVideoGameList encourages visitors to frequently check this page for any changes to its Privacy Policy. If you have a WordPress.com account, you should also check your blog's dashboard for alerts to these changes. Your continued use of this site after any change in this Privacy Policy will constitute your acceptance of such change.</p>
<div class="separator my-5"></div>
<p><span class="fw-bolder">Last Updated:</span> April 25, 2022</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
</x-base-layout>

View file

@ -0,0 +1,157 @@
@php
$client = new JoyPixels\Client(new JoyPixels\Ruleset());
$client->ascii = true;
$userId = (Auth::check()) ? auth()->user()->id : $user->id;
$coverpic = (Auth::check()) ? auth()->user()->coverpic : $user->coverpic;
$avatar = (Auth::check()) ? auth()->user()->avatar : $user->avatar;
$createdAt = (Auth::check()) ? auth()->user()->created_at->format('F d, Y') : $user->created_at->format('F d, Y');
$profileViews = (Auth::check()) ? number_format(auth()->user()->profile_views) : number_format($user->profile_views);
$gameListViews = (Auth::check()) ? number_format(auth()->user()->list_views) : number_format($user->list_views);
$blogViews = (Auth::check()) ? number_format(auth()->user()->blog_views) : number_format($user->blog_views);
$bio = (Auth::check()) ? auth()->user()->bio : $user->bio;
$gamesOnListCount = (Auth::check()) ? auth()->user()->gameList->count() : $user->gameList->count();
$averageGameRating = (Auth::check()) ? round(auth()->user()->gameList->average('rating'), 2) : round($user->gameList->average('rating'), 2);
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<div class="col-xxl-12">
<div class="card shadow-sm">
<div class="card-body p-0">
<div class="card-rounded h-400px" style="background-image: url({{ Storage::url('assets/coverpics/') . $coverpic }}); background-size: cover;">
<div class="d-flex flex-wrap flex-sm-nowrap pt-1 ps-9 mb-2">
<!--begin: Pic-->
<div class="symbol symbol-100px symbol-lg-160px symbol-fixed position-absolute bottom-0 mb-7">
<img class="img-thumbnail" src="{{ Storage::url('assets/avatars/') . $avatar }}" alt="image">
{{-- <div class="position-absolute translate-middle bottom-0 start-100 mb-6 bg-success rounded-circle border border-4 border-white h-20px w-20px"></div> --}}
</div>
<!--end::Pic-->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row gy-5 g-xl-8 mt-0">
<div class="col-md-3">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">{{ auth()->user()->username ?? $user->username }}</h3>
{{-- <div class="card-toolbar">
<button type="button" class="btn btn-sm btn-light">
Add / Remove Friend
</button>
</div> --}}
</div>
<div class="card-body">
<div class="mb-3">
<span class="fw-bolder">Join Date:</span><br />
{{ $createdAt }}
</div>
<div class="mb-3">
<span class="fw-bolder">Profile Views:</span><br />
{{ $profileViews }}
</div>
<div class="mb-3">
<span class="fw-bolder">Games on List:</span> <br />
{{ $gamesOnListCount ?? '0'}}
</div>
<div class="mb-3">
<span class="fw-bolder">List Views:</span> <br />
{{ $gameListViews}}
</div>
<div class="mb-3">
<span class="fw-bolder">Average Game Rating:</span> <br />
{{ $averageGameRating ?? 'No games rated yet.'}}
</div>
<div class="mb-3">
<span class="fw-bolder">Game Reviews Written:</span> <br />
Coming soon...
</div>
<div class="mb-3">
<span class="fw-bolder">Favorited Games:</span> <br />
Coming soon...
</div>
<div class="mb-3">
<span class="fw-bolder">Wishlisted Games:</span> <br />
Coming soon...
</div>
<div class="mb-3">
<span class="fw-bolder">Blog Entries:</span> <br />
Coming soon...
</div>
<div class="mb-3">
<span class="fw-bolder">Blog Views:</span><br />
{{ $blogViews }}
</div>
<div class="mb-3">
<span class="fw-bolder">Profile Comments Left:</span> <br />
Coming soon...
</div>
<div class="mb-3">
<span class="fw-bolder">Friends:</span> <br />
Coming soon...
</div>
<div class="mb-3">
<span class="fw-bolder">Friends Of:</span> <br />
Coming soon...
</div>
</div>
</div>
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Social Media Links</h3>
</div>
<div class="card-body">
<p class="mb-0">Coming soon...</p>
</div>
</div>
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Gamertags</h3>
</div>
<div class="card-body">
<p class="mb-0">Coming soon...</p>
</div>
</div>
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title">My Consoles</h3>
</div>
<div class="card-body">
<p class="mb-0">Coming soon...</p>
</div>
</div>
</div>
<div class="col-md-9">
<div class="card shadow-sm mb-2">
<div class="card-body">
<div id="user-bio">
@if ($userId == 1 || $userId == 2)
{!! Markdown::parse($client->shortnameToImage($bio), ['purifier' => false]) !!}
@else
@if (isset($bio))
{!! Markdown::parse($client->shortnameToImage($bio)) !!}
@else
<p>No bio yet. Check back later.</p>
@endif
@endif
</div>
</div>
</div>
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title">Comments</h3>
</div>
<div class="card-body">
<p class="mb-0">Coming soon...</p>
</div>
</div>
</div>
</div>
</x-base-layout>

View file

@ -0,0 +1,108 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Platform;
use Illuminate\Support\Str;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Search Results</h3>
</div>
<div class="card-body">
@foreach ($games as $game)
@php
$gameName = str_replace('/', '_', str_replace(' ', '_', $game->name));
$platform = $game->platform()->get()[0]->name;
$averageRating = round(GameList::whereGameId($game->id)->avg('rating') * 2) / 2;
@endphp
<!--begin::Game-->
<div class="d-flex align-items-start flex-grow-1">
<!--begin::Boxart-->
<div class="me-5">
<img class="mw-125px img-thumbnail" src="{{ Storage::url('assets/boxart/') . $game->boxart }}" alt="">
</div>
<!--end::Boxart-->
<!--begin::Info-->
<div class="d-flex flex-column">
<div class="d-flex justify-content-between">
<a href="/game/{{ $game->id }}/{{ $gameName }}" class="text-primary-900 text-hover-primary-600 fs-3 fw-bolder">{{ $game->name }}</a>
<span class="badge badge-primary">{{ $platform }}</span>
</div>
@if ($game->alt_titles)
@php
$altTitles = str_replace('|', ', ', $game->alt_titles);
@endphp
<span class="text-dark"><span class="fw-bolder">Alternative Titles:</span> {{ $altTitles }}</span>
@endif
<div class="rating">
@php
while ($averageRating > 0) {
if ($averageRating == 0.5) {
echo '<div class="rating-label me-2 checked">
<i class="fas fa-star-half text-warning"></i>
</div>';
$averageRating = $averageRating - 0.5;
} else {
echo '<div class="rating-label me-2 checked">
<i class="fas fa-star text-warning fs-6"></i>
</div>';
$averageRating--;
}
}
@endphp
</div>
<p class="text-gray-800 fw-normal mt-3 mb-5">{{ Str::words($game->description, 50) }}</p>
{{-- <div class="d-flex align-items-center mb-5">
<div class="btn btn-sm btn-light btn-color-muted btn-active-light-primary px-4 py-2 me-4">
<!--begin::Svg Icon | path: icons/duotune/communication/com012.svg-->
<span class="svg-icon svg-icon-3">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path opacity="0.3" d="M20 3H4C2.89543 3 2 3.89543 2 5V16C2 17.1046 2.89543 18 4 18H4.5C5.05228 18 5.5 18.4477 5.5 19V21.5052C5.5 22.1441 6.21212 22.5253 6.74376 22.1708L11.4885 19.0077C12.4741 18.3506 13.6321 18 14.8167 18H20C21.1046 18 22 17.1046 22 16V5C22 3.89543 21.1046 3 20 3Z" fill="currentColor"></path>
<rect x="6" y="12" width="7" height="2" rx="1" fill="currentColor"></rect>
<rect x="6" y="7" width="12" height="2" rx="1" fill="currentColor"></rect>
</svg>
</span>
<!--end::Svg Icon-->120</div>
<div class="btn btn-sm btn-light btn-color-muted btn-active-light-danger px-4 py-2">
<!--begin::Svg Icon | path: icons/duotune/general/gen030.svg-->
<span class="svg-icon svg-icon-2">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M18.3721 4.65439C17.6415 4.23815 16.8052 4 15.9142 4C14.3444 4 12.9339 4.73924 12.003 5.89633C11.0657 4.73913 9.66 4 8.08626 4C7.19611 4 6.35789 4.23746 5.62804 4.65439C4.06148 5.54462 3 7.26056 3 9.24232C3 9.81001 3.08941 10.3491 3.25153 10.8593C4.12155 14.9013 9.69287 20 12.0034 20C14.2502 20 19.875 14.9013 20.7488 10.8593C20.9109 10.3491 21 9.81001 21 9.24232C21.0007 7.26056 19.9383 5.54462 18.3721 4.65439Z" fill="currentColor"></path>
</svg>
</span>
<!--end::Svg Icon-->15</div>
</div> --}}
</div>
<!--end::Info-->
</div>
<!--end::Game-->
<div class="separator my-5"></div>
@endforeach
<div class="d-flex justify-content-center">
{{ $games->links('partials.general._pagination') }}
</div>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,35 @@
@php
use App\Models\User;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Support - Overview</h3>
</div>
<div class="card-body">
<p>Coming soon!</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,35 @@
@php
use App\Models\User;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Support - Knowledgebase</h3>
</div>
<div class="card-body">
<p>Coming soon!</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>

View file

@ -0,0 +1,98 @@
@php
$client = new JoyPixels\Client(new JoyPixels\Ruleset());
$client->ascii = true;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title">Terms of Service</h3>
</div>
<div class="card-body">
<p>The following terms and conditions govern all use of the MyVideoGameList.com website and all content, services and products available at or through the website. The Website is owned and operated by MyVideoGameList. ("MyVideoGameList"). The Website is offered subject to your acceptance without modification of all of the terms and conditions contained herein and all other operating rules, policies (including, without limitation, MyVideoGameList's Privacy Policy) and procedures that may be published from time to time on this Site by MyVideoGameList (collectively, the "Agreement").<br />
<br />
Please read this Agreement carefully before accessing or using the Website. By accessing or using any part of the web site, you agree to become bound by the terms and conditions of this agreement. If you do not agree to all the terms and conditions of this agreement, then you may not access the Website or use any services. If these terms and conditions are considered an offer by MyVideoGameList, acceptance is expressly limited to these terms. The Website is available only to individuals who are at least 13 years old.<br />
<br />
<strong>Your MyVideoGameList.com Account and Site.</strong> If you create an account on the Website, you are responsible for maintaining the security of your account and list, and you are fully responsible for all activities that occur under the account and any other actions taken in connection with the account. You must not describe or assign keywords to your account in a misleading or unlawful manner, including in a manner intended to trade on the name or reputation of others, and MyVideoGameList may change or remove any description or keyword that it considers inappropriate or unlawful, or otherwise likely to cause MyVideoGameList liability. You must immediately notify MyVideoGameList of any unauthorized uses of your account or any other breaches of security. MyVideoGameList will not be liable for any acts or omissions by You, including any damages of any kind incurred as a result of such acts or omissions.<br />
<br />
<strong>Responsibility of Contributors.</strong> If you operate an account, comment on an account, post material to the Website, post links on the Website, or otherwise make (or allow any third party to make) material available by means of the Website (any such material, "Content"), You are entirely responsible for the content of, and any harm resulting from, that Content. That is the case regardless of whether the Content in question constitutes text, graphics, an audio file, or computer software. By making Content available, you represent and warrant that:
</p>
<ul>
<li>the downloading, copying and use of the Content will not infringe the proprietary rights, including but not limited to the copyright, patent, trademark or trade secret rights, of any third party;</li>
<li>if your employer has rights to intellectual property you create, you have either
<ul style="list-style-type: lower-roman;">
<li>received permission from your employer to post or make available the Content, including but not limited to any software, or</li>
<li>secured from your employer a waiver as to all rights in or to the Content;</li>
</ul>
</li>
<li>you have fully complied with any third-party licenses relating to the Content, and have done all things necessary to successfully pass through to end users any required terms;
the Content does not contain or install any viruses, worms, malware, Trojan horses or other harmful or destructive content;</li>
<li>the Content is not spam, is not machine- or randomly-generated, and does not contain unethical or unwanted commercial content designed to drive traffic to third party sites or boost the search engine rankings of third party sites, or to further unlawful acts (such as phishing) or mislead recipients as to the source of the material (such as spoofing);</li>
<li>the Content is not pornographic, does not contain threats or incite violence towards individuals or entities, and does not violate the privacy or publicity rights of any third party;</li>
<li>your account is not getting advertised via unwanted electronic messages such as spam links on newsgroups, email lists, other blogs and web sites, and similar unsolicited promotional methods;</li>
<li>your account or list is not named in a manner that misleads your readers into thinking that you are another person or company. For example, your account's URL or name is not the name of a person other than yourself or company other than your own; and</li>
<li>you have, in the case of Content that includes computer code, accurately categorized and/or described the type, nature, uses and effects of the materials, whether requested to do so by MyVideoGameList or otherwise.</li>
</ul>
<p>By submitting Content to MyVideoGameList/MyVideoGameList.com for inclusion on your Website, you grant MyVideoGameList a world-wide, royalty-free, and non-exclusive license to reproduce, modify, adapt and publish the Content solely for the purpose of displaying, distributing and promoting your blog. If you delete Content, MyVideoGameList will use reasonable efforts to remove it from the Website, but you acknowledge that caching or references to the Content may not be made immediately unavailable.<br />
<br />
Without limiting any of those representations or warranties, MyVideoGameList has the right (though not the obligation) to, in MyVideoGameList's sole discretion</p>
<ul style="list-style-type: lower-roman;">
<li>refuse or remove any content that, in MyVideoGameList's reasonable opinion, violates any MyVideoGameList policy or is in any way harmful or objectionable, or</li>
<li>terminate or deny access to and use of the Website to any individual or entity for any reason, in MyVideoGameList's sole discretion.</li>
</ul>
<p><strong>Responsibility of Website Visitors.</strong> MyVideoGameList has not reviewed, and cannot review, all of the material, including computer software, posted to the Website, and cannot therefore be responsible for that material's content, use or effects. By operating the Website, MyVideoGameList does not represent or imply that it endorses the material there posted, or that it believes such material to be accurate, useful or non-harmful. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. The Website may contain content that is offensive, indecent, or otherwise objectionable, as well as content containing technical inaccuracies, typographical mistakes, and other errors. The Website may also contain material that violates the privacy or publicity rights, or infringes the intellectual property and other proprietary rights, of third parties, or the downloading, copying or use of which is subject to additional terms and conditions, stated or unstated. MyVideoGameList disclaims any responsibility for any harm resulting from the use by visitors of the Website, or from any downloading by those visitors of content there posted.<br />
<br />
<strong>Content Posted on Other Websites.</strong> We have not reviewed, and cannot review, all of the material, including computer software, made available through the websites and webpages to which MyVideoGameList.com links, and that link to MyVideoGameList.com. MyVideoGameList does not have any control over those non-MyVideoGameList websites and webpages, and is not responsible for their contents or their use. By linking to a non-WordPress website or webpage, MyVideoGameList does not represent or imply that it endorses such website or webpage. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. MyVideoGameList disclaims any responsibility for any harm resulting from your use of non-MyVideoGameList websites and webpages.<br />
<br />
<strong>Copyright Infringement and DMCA Policy.</strong> As MyVideoGameList asks others to respect its intellectual property rights, it respects the intellectual property rights of others. If you believe that material located on or linked to by WordPress.com violates your copyright, you are encouraged to notify MyVideoGameList in accordance with the Digital Millennium Copyright Act ("DMCA"). MyVideoGameList will respond to all such notices, including as required or appropriate by removing the infringing material or disabling all links to the infringing material. MyVideoGameList will terminate a visitor's access to and use of the Website if, under appropriate circumstances, the visitor is determined to be a repeat infringer of the copyrights or other intellectual property rights of MyVideoGameList or others.<br />
<br />
<strong>Intellectual Property.</strong> This Agreement does not transfer from MyVideoGameList to you any MyVideoGameList or third party intellectual property, and all right, title and interest in and to such property will remain (as between the parties) solely with MyVideoGameList. MyVideoGameList, MyVideoGameList, MyVideoGameList.com, the MyVideoGameList.com logo, and all other trademarks, service marks, graphics and logos used in connection with MyVideoGameList.com, or the Website are trademarks or registered trademarks of MyVideoGameList or MyVideoGameList's licensors. Other trademarks, service marks, graphics and logos used in connection with the Website may be the trademarks of other third parties. Your use of the Website grants you no right or license to reproduce or otherwise use any MyVideoGameList or third-party trademarks.<br />
<br />
<strong>Advertisements.</strong> MyVideoGameList reserves the right to display advertisements on your account.<br />
<br />
<strong>Changes.</strong> MyVideoGameList reserves the right, at its sole discretion, to modify or replace any part of this Agreement. It is your responsibility to check this Agreement periodically for changes. Your continued use of or access to the Website following the posting of any changes to this Agreement constitutes acceptance of those changes. MyVideoGameList may also, in the future, offer new services and/or features through the Website (including, the release of new tools and resources). Such new features and/or services shall be subject to the terms and conditions of this Agreement.<br />
<br />
<strong>Termination.</strong> MyVideoGameList may terminate your access to all or any part of the Website at any time, with or without cause, with or without notice, effective immediately. If you wish to terminate this Agreement or your MyVideoGameList.com account (if you have one), you may simply discontinue using the Website. All provisions of this Agreement which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability.<br />
<br />
<strong>Disclaimer of Warranties.</strong> The Website is provided "as is". MyVideoGameList and its suppliers and licensors hereby disclaim all warranties of any kind, express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement. Neither MyVideoGameList nor its suppliers and licensors, makes any warranty that the Website will be error free or that access thereto will be continuous or uninterrupted. If you're actually reading this, here's a treat. You understand that you download from, or otherwise obtain content or services through, the Website at your own discretion and risk.<br />
<br />
<strong>Limitation of Liability.</strong> In no event will MyVideoGameList, or its suppliers or licensors, be liable with respect to any subject matter of this agreement under any contract, negligence, strict liability or other legal or equitable theory for:</p>
<ul style="list-style-type: lower-roman;">
<li>any special, incidental or consequential damages;</li>
<li>the cost of procurement or substitute products or services;</li>
<li>for interruption of use or loss or corruption of data; or</li>
<li>for any amounts that exceed the fees paid by you to MyVideoGameList under this agreement during the twelve (12) month period prior to the cause of action. MyVideoGameList shall have no liability for any failure or delay due to matters beyond their reasonable control. The foregoing shall not apply to the extent prohibited by applicable law.</li>
</ul>
<p><strong>General Representation and Warranty.</strong> You represent and warrant that</p>
<ul style="list-style-type: lower-roman">
<li>your use of the Website will be in strict accordance with the MyVideoGameList Privacy Policy, with this Agreement and with all applicable laws and regulations (including without limitation any local laws or regulations in your country, state, city, or other governmental area, regarding online conduct and acceptable content, and including all applicable laws regarding the transmission of technical data exported from the United States or the country in which you reside) and</li>
<li>your use of the Website will not infringe or misappropriate the intellectual property rights of any third party.</li>
</ul>
<p><strong>Indemnification.</strong> You agree to indemnify and hold harmless MyVideoGameList, its contractors, and its licensors, and their respective directors, officers, employees and agents from and against any and all claims and expenses, including attorneys' fees, arising out of your use of the Website, including but not limited to your violation of this Agreement.<br />
<br />
<strong>Miscellaneous.</strong> This Agreement constitutes the entire agreement between MyVideoGameList and you concerning the subject matter hereof, and they may only be modified by a written amendment signed by an authorized executive of MyVideoGameList, or by the posting by MyVideoGameList of a revised version. Except to the extent applicable law, if any, provides otherwise, this Agreement, any access to or use of the Website will be governed by the laws of the state of California, U.S.A., excluding its conflict of law provisions, and the proper venue for any disputes arising out of or relating to any of the same will be the state and federal courts located in San Francisco County, California. Except for claims for injunctive or equitable relief or claims regarding intellectual property rights (which may be brought in any competent court without the posting of a bond), any dispute arising under this Agreement shall be finally settled in accordance with the Comprehensive Arbitration Rules of the Judicial Arbitration and Mediation Service, Inc. ("JAMS") by three arbitrators appointed in accordance with such Rules. The arbitration shall take place in Houston, Texas, in the English language and the arbitral decision may be enforced in any court. The prevailing party in any action or proceeding to enforce this Agreement shall be entitled to costs and attorneys' fees. If any part of this Agreement is held invalid or unenforceable, that part will be construed to reflect the parties' original intent, and the remaining portions will remain in full force and effect. A waiver by either party of any term or condition of this Agreement or any breach thereof, in any one instance, will not waive such term or condition or any subsequent breach thereof. You may assign your rights under this Agreement to any party that consents to, and agrees to be bound by, its terms and conditions; MyVideoGameList may assign its rights under this Agreement without condition. This Agreement will be binding upon and will inure to the benefit of the parties, their successors and permitted assigns.</p>
<div class="separator my-5"></div>
<p><span class="fw-bolder">Last Updated:</span> April 25, 2022</p>
</div>
</div>
</div>
<!--end::Col-->
<!--begin::Col-->
<div class="col-xxl-4">
@if (Auth::check())
{{ theme()->getView('partials/general/_donate-block') }}
@endif
{{ theme()->getView('partials/general/_recent-user-updates-block') }}
{{ theme()->getView('partials/general/_most-popular-games-block') }}
</div>
<!--end::Col-->
</div>
</x-base-layout>

View file

@ -0,0 +1,69 @@
@php
use App\Models\Game;
use App\Models\GameList;
use App\Models\Platform;
use Illuminate\Support\Str;
@endphp
<x-base-layout>
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
<!--begin::Col-->
<div class="col-xxl-8">
<div class="card shadow-sm mb-2">
<div class="card-header">
<h3 class="card-title">Wishlist</h3>
</div>
<div class="card-body">
@if (count($wishlist) === 0)
<p class="text-gray-800 fw-normal mt-3 mb-5">There are no games on this wishlist.</p>
@else
@foreach ($wishlist as $item)
@php
$game = Game::find($item->game_id);
if ($game === null) {
continue;
}
$gameName = str_replace('/', '_', str_replace(' ', '_', $game->name));
$platform = Platform::whereId($game->platform_id)->get();
@endphp
<!--begin::Game-->
<div class="d-flex align-items-start flex-grow-1">
<!--begin::Boxart-->
<div class="me-5">
<img class="mw-125px img-thumbnail" src="{{ Storage::url('assets/boxart/') . $game->boxart }}" alt="">
</div>
<!--end::Boxart-->
<!--begin::Info-->
<div class="d-flex flex-column">
<div class="d-flex justify-content-between">
<a href="/game/{{ $game->id }}/{{ $gameName }}" class="text-primary-900 text-hover-primary-600 fs-3 fw-bolder">{{ $game->name }}</a>
</div>
@if ($game->alt_titles)
@php
$altTitles = str_replace('|', ', ', $game->alt_titles);
@endphp
<span class="text-dark"><span class="fw-bolder">Alternative Titles:</span> {{ $altTitles }}</span>
@endif
<p class="text-gray-800 fw-normal mt-3 mb-5">{{ Str::words($game->description, 50) }}</p>
</div>
<!--end::Info-->
</div>
<!--end::Game-->
<div class="separator my-5"></div>
@endforeach
@endif
</div>
</div>
</div>
<!--end::Col-->
</div>
<!--end::Row-->
</x-base-layout>