@php $user_role = auth()->user()->role; $admin = 1; $auth_staff = 0; $auth_branch = 3; $auth_client = 4; $auth_dilver = 5; @endphp @lang('view.website') @if (check_module('Cargo')) @if($user_role == $auth_branch || $user_role == $auth_client || auth()->user()->can('create-shipments')) {{ __('cargo::view.create_new_shipment') }} @endif @endif {{ \Auth::user()->unreadNotifications->count() }} @if (\Auth::user()->unreadNotifications->count() > 0) {{ \Auth::user()->unreadNotifications->count() }} @lang('view.notifications') @foreach (\Auth::user()->unreadNotifications as $key => $item) {{ $item->data['message']['subject'] }} {{ $item->created_at->diffForHumans(null, null, true) }} @endforeach @lang('view.see_all_notifications') @else @lang('view.no_new_notifications') @endif {{ auth()->user()->name }} @checkModule('users') {{-- Admin --}} @if ($user_role == $admin) @lang('users::view.my_profile') @lang('users::view.account_settings') @endif {{-- client --}} @if ($user_role == $auth_client) @php $item_id = Modules\Cargo\Entities\Client::where('user_id', auth()->user()->id) ->pluck('id') ->first(); @endphp @lang('users::view.my_profile') @lang('users::view.account_settings') @lang('cargo::view.manage_address') @endif {{-- branch --}} @if ($user_role == $auth_branch) @php $item_id = Modules\Cargo\Entities\Branch::where('user_id', auth()->user()->id) ->pluck('id') ->first(); @endphp @lang('users::view.my_profile') @lang('users::view.account_settings') @endif {{-- driver --}} @if ($user_role == $auth_dilver) @php $item_id = Modules\Cargo\Entities\Driver::where('user_id', auth()->user()->id) ->pluck('id') ->first(); @endphp @lang('users::view.my_profile') @lang('users::view.account_settings') @endif {{-- staff --}} @if ($user_role == $auth_staff) @php $item_id = Modules\Cargo\Entities\Staff::where('user_id', auth()->user()->id) ->pluck('id') ->first(); @endphp @lang('users::view.my_profile') @lang('users::view.account_settings') @endif @endcheckModule @csrf @lang('view.sign_out') @if (check_module('Localization')) @if (Config::get('current_lang_image')) @endif{{ LaravelLocalization::getCurrentLocaleName() }} @foreach (Modules\Localization\Entities\Language::all() as $key => $language ) {{-- {{ dd($language) }} --}} @if ($language->imageUrl) @endif {{ $language->name }} @endforeach @endif