@php use App\Models\Currency;$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', ], ]; if ($app_is_not_demo) { $premium_features = \App\Models\OpenAIGenerator::query()->where('active', 1)->where('premium', 1)->get()->pluck('title')->toArray(); } else { $premium_features = [__('Unlimited Credits'), __('Smart Schedule'), __('FB, IG, X, Linkedin Channels'), __('Premium Support')]; } $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') . '); }'; } @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') @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 @lang(setting('announcement_title', 'Welcome to MagicAI!'))
@endif

{{-- blade-formatter-disable --}} {{-- blade-formatter-enable --}} @lang('Hey, How can I help you?')

@lang('Create a Blank Document')
@if ($ongoingPayments != null)
@include('panel.user.finance.ongoingPayments')
@endif @include('panel.user.finance.subscriptionStatus') @if (!$user_is_premium && $app_is_not_demo)

@lang('Premium Advantages')

@lang('Upgrade your plan to unlock new AI capabilities.')

    @foreach ($premium_features as $feature)
  • {{ $feature }}
  • @endforeach
@lang('Upgrade Your Plan')
@endif @if (showTeamFunctionality()) @if ($team)
Team

@lang('Add your team members’ email address
to start collaborating.') 📧

@csrf @if ($app_is_demo) @lang('Invite Friends') @else @lang('Invite Friends') @endif
@else

{{ __('How it Works') }}

  1. 1 {!! __('You send your invitation link to your friends.') !!}
  2. 2 {!! __('They subscribe to a paid plan by using your refferral link.') !!}
  3. 3 @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
{{ __('Send') }}
@endif
@endif @if($app_is_not_demo && ($setting->feature_affilates ?? true) && (\auth()->user()?->affiliate_status === 1)) @php $user = auth()->user(); $list = $user->affiliates; $list2 = $user->withdrawals; $totalEarnings = 0; foreach ($list as $affOrders) { $totalEarnings += $affOrders->orders->sum('affiliate_earnings'); } $totalWithdrawal = 0; foreach ($list2 as $affWithdrawal) { $totalWithdrawal += $affWithdrawal->amount; } $earnings = $totalEarnings - $totalWithdrawal; if ($earnings < 0) { $earnings = 0; } $currencyId = $setting->default_currency ?? 124; $currency = Currency::find($currencyId); $affilate_code = $user->affiliate_code; @endphp

{{__('Invite your friends and earn lifelong recurring commissions.')}} 💸

@lang('Simply share your referral link and have your friends sign up through it.')

@lang('Comission Rate:')

{{ $setting->affiliate_commission_percentage }}%

@lang('Referral Program:')

@if ($is_onetime_commission) {{ __('First Purchase') }} @else {{ __('All Purchases') }} @endif

@lang('Earnings') @if (currencyShouldDisplayOnRight(currency()->symbol)) {{ $totalEarnings - $totalWithdrawal }}{{ currency()->symbol }} @else {{ currency()->symbol }}{{ $totalEarnings - $totalWithdrawal }} @endif
@endif

@lang('Recently Launched')

@foreach ($recently_launched as $entry) @if ($entry->generator != null) @endif @endforeach

{{ __('Documents') }}

@foreach (Auth::user()->openai()->with('generator')->take(4)->get() as $entry) @if ($entry->generator != null) @endif @endforeach

{{ __('Favorite Templates') }}

@foreach (auth()->user()->favoriteOpenai 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), 5) }} {{ __('in Workbook') }} {{ $entry->created_at->format('M d, Y') }} @if ($upgrade) {{ __('Upgrade') }} @endif @if ($upgrade || $entry->active == 1) @else

@endif @if ($loop->iteration == 4) @break @endif @endforeach
@endsection @push('script') @includeFirst(['onboarding::include.introduction', 'panel.admin.onboarding.include.introduction', 'vendor.empty']) @includeFirst(['onboarding-pro::include.introduction', 'panel.admin.onboarding-pro.include.introduction', 'vendor.empty']) @endpush