@php
$plan = Auth::user()->activePlan();
$plan_type = 'regular';
// $team = Auth::user()->getAttribute('team');
$teamManager = Auth::user()->getAttribute('teamManager');
if ($plan != null) {
$plan_type = strtolower($plan->plan_type);
}
$titlebar_links = [
[
'label' => 'All',
'link' => '#all',
],
[
'label' => 'AI Assistant',
'link' => '#all',
],
[
'label' => 'Your Plan',
'link' => '#plan',
],
[
'label' => 'Team Members',
'link' => '#team',
],
[
'label' => 'Recent',
'link' => '#recent',
],
[
'label' => 'Documents',
'link' => '#documents',
],
[
'label' => 'Templates',
'link' => '#templates',
],
[
'label' => 'Overview',
'link' => '#all',
],
];
$premium_features = \App\Models\OpenAIGenerator::query()
->where('active', 1)
->where('premium', 1)
->get()
->pluck('title')
->toArray();
$user_is_premium = false;
$plan = auth()->user()?->relationPlan;
if ($plan) {
$planType = strtolower($plan->plan_type ?? 'all');
if ($plan->plan_type === 'all' || $plan->plan_type === 'premium') {
$user_is_premium = true;
}
}
$style_string = '';
if (setting('announcement_background_color')) {
$style_string .=
'.lqd-card.lqd-announcement-card { background-color: ' . setting('announcement_background_color') . ';}';
}
if (setting('announcement_background_image')) {
$style_string .=
'.lqd-card.lqd-announcement-card { background-image: url(' .
setting('announcement_background_image') .
'); }';
}
if (setting('announcement_background_color_dark')) {
$style_string .=
'.theme-dark .lqd-card.lqd-announcement-card { background-color: ' .
setting('announcement_background_color_dark') .
';}';
}
if (setting('announcement_background_image_dark')) {
$style_string .=
'.theme-dark .lqd-card.lqd-announcement-card { background-image: url(' .
setting('announcement_background_image_dark') .
'); }';
}
$favoriteOpenAis = cache('favorite_openai');
@endphp
@if (filled($style_string))
@push('css')
@endpush
@endif
@extends('panel.layout.app', ['disable_tblr' => true])
@section('title', __('Dashboard'))
@section('titlebar_title')
{{ __('Welcome') }}, {{ auth()->user()?->name }}.
@endsection
@section('titlebar_after')
@foreach ($titlebar_links as $link)
$loop->first,
])
variant="ghost"
href="{{ $link['link'] }}"
x-data="{}"
>
@lang($link['label'])
@endforeach
@endsection
@section('content')
@if (setting('announcement_active', 0) && !auth()->user()?->dash_notify_seen)
@lang(setting('announcement_title', 'Welcome'))
@lang(setting('announcement_description', 'We are excited to have you here. Explore the marketplace to find the best AI models for your needs.'))
{{ setting('announcement_button_text', 'Try it Now') }}
@lang('Dismiss')
@if (setting('announcement_image_dark'))
@endif
@endif
{{-- blade-formatter-disable --}}
{{-- blade-formatter-enable --}}
@lang('Hey, How can I help you?')
@lang('Create a Blank Document')
@if ($ongoingPayments != null)
@includeIf('panel.user.finance.ongoingPayments')
@endif
@includeIf('panel.user.finance.subscriptionStatus')
@if (!$user_is_premium || $app_is_demo)
@lang('Premium Advantages')
@lang('Upgrade your plan to unlock new AI capabilities.')
{{-- Mr. Hakan wanted me to add this as static for now. --}}
@foreach (['Unlimited Credits', 'Access to All Templates', 'External Chatbots', 'o1-mini and DeepSeek R1', 'Premium Support'] as $feature)
{{ __($feature) }}
@endforeach
@lang('Upgrade Your Plan')
@endif
{{-- begin: account summary --}}
@includeIf('panel.user.dashboard.account-summary')
{{-- end: account summary --}}
{{-- begin: invite team --}}
@if (showTeamFunctionality())
@if ($team)
@lang('Add your team members’ email address to start collaborating.')
📧
@else
{{ __('How it Works') }}
{!! __('You send your invitation link to your friends.') !!}
{!! __('They subscribe to a paid plan by using your refferral link.') !!}
@if ($is_onetime_commission)
{!! __('From their first purchase, you will begin earning one-time commissions .') !!}
@else
{!! __('From their first purchase, you will begin earning recurring commissions .') !!}
@endif
@endif
@endif
{{-- end: invite team --}}
{{-- begin: affiliates --}}
@includeIf('panel.user.dashboard.affiliates')
{{-- end: affiliates --}}
{{-- begin: favorite chatbots --}}
@includeIf('panel.user.dashboard.favorite-chatbots')
{{-- end: favorite chatbots --}}
{{-- begin: add new --}}
!View::exists('panel.user.dashboard.favorite-chatbots'),
])
size="md"
>
{{ __('Add New') }}
@if (\App\Helpers\Classes\MarketplaceHelper::isRegistered('chatbot') || $app_is_demo)
@lang('External Chatbot')
@endif
@if (\App\Helpers\Classes\MarketplaceHelper::isRegistered('social-media') || $app_is_demo)
@lang('Social Media Post')
@endif
@if (\App\Helpers\Classes\MarketplaceHelper::isRegistered('openai-realtime-chat') || $app_is_demo)
@lang('Voice Chat')
@endif
@lang('Blog Post')
{{-- end: add new --}}
{{-- begin: social media posts --}}
@includeIf('social-media::theme.social-media-post-default-theme')
{{-- end: social media posts --}}
{{-- begin: recently launched --}}
{{ __('Recently Launched') }}
{{ __('View All') }}
@foreach ($recently_launched as $entry)
@if ($entry->generator != null)
@endif
@endforeach
{{-- end: recently launched --}}
{{-- begin: favorite templates --}}
{{ __('Favorite Templates') }}
{{ __('View All') }}
@foreach ($favoriteOpenAis as $entry)
@php
$upgrade = false;
if ($entry->premium == 1 && $plan_type === 'regular') {
$upgrade = true;
}
if ($upgrade) {
$href = LaravelLocalization::localizeUrl(route('dashboard.user.payment.subscription'));
} elseif (
isset($entry->slug) &&
in_array($entry->slug, [
'ai_vision',
'ai_ai_chat_image',
'ai_code_generator',
'ai_youtube',
'ai_pdf',
])
) {
$href = LaravelLocalization::localizeUrl(
route('dashboard.user.openai.generator.workbook', $entry->slug),
);
} else {
$href = LaravelLocalization::localizeUrl(
route('dashboard.user.openai.generator', $entry->slug),
);
}
@endphp
@if ($upgrade || $entry->active == 1)
@else
@endif
@if ($entry->image !== 'none')
{!! html_entity_decode($entry->image) !!}
@endif
{{ __($entry->title) }}
{{ str()->words(__($entry->description)) }}
@if ($upgrade)
{{ __('Upgrade') }}
@endif
@if ($upgrade || $entry->active == 1)
@else
@endif
@if ($loop->iteration == 4)
@break
@endif
@endforeach
{{-- end: favorite templates --}}
@includeFirst(['announcement::partials.dashboard', 'vendor.empty'])
{{-- begin: submit ticket --}}
@lang('Have a question?')
@lang('We’re here to help you.')
{{ __('Submit a Ticket') }}
{{-- end: submit ticket --}}
@endsection
@push('script')
@if ($app_is_not_demo)
@includeFirst([
'onboarding::include.introduction',
'panel.admin.onboarding.include.introduction',
'vendor.empty',
])
@includeFirst([
'onboarding-pro::include.introduction',
'panel.admin.onboarding-pro.include.introduction',
'vendor.empty',
])
@endif
@if (Route::has('dashboard.user.dash_notify_seen'))
@endif
@endpush