/home/kueuepay/public_html/resources/views/user/partials/top-nav.blade.php
<div class="navbar-wrapper">
    <div class="dashboard-title-part">
        <div class="left">
            <div class="icon">
                <button class="sidebar-menu-bar">
                    <i class="fas fa-exchange-alt"></i>
                </button>
            </div>
            <div class="dashboard-path">
                @yield('breadcrumb')
            </div>
        </div>
        <div class="right"> 
            @php
                $current_url  = URL::current();
            @endphp
            @if ($current_url  == setRoute('user.card.index') || $current_url  == setRoute('user.transaction.log.card.payment') || $current_url  == setRoute('user.transaction.log.add.money') || $current_url  == setRoute('user.transaction.log.transfer.money'))
                <form class="header-search-wrapper">
                    <div class="position-relative">
                        <input class="form-control" type="text" name="search_text" placeholder="{{ __("Ex: Cards or Trx") }}" aria-label="Search">
                        <span class="las la-search"></span>
                    </div>
                </form>
            @endif 
            <div class="language-select me-2">
                @php
                    $__current_local = session("local") ?? get_default_language_code();
                @endphp
                <select class="nice-select" name="lang_switcher" id="">
                    @foreach ($__languages as $__item)
                        <option value="{{ $__item->code }}" @if ($__current_local == $__item->code)
                            @selected(true)
                        @endif>{{ $__item->name }}</option>
                    @endforeach
                </select>
            </div>   
            <div class="header-notification-wrapper">
                <button class="notification-icon"> 
                    <i class="las la-bell"></i>
                </button>
                <div class="notification-wrapper">
                    <div class="notification-header">
                        <h5 class="title">{{ __("Notification") }}</h5>
                    </div>
                    <ul class="notification-list">
                        @foreach (get_user_notifications() ?? [] as $item)
                            <li>
                                <div class="thumb">
                                    <img src="{{ auth()->user()->userImage ?? asset('public/frontend/images/user/user-1.png') }}" alt="user">
                                </div>
                                <div class="content">
                                    <div class="title-area">
                                        <h5 class="title">{{ __(@$item->details->title) }}</h5>
                                    </div>
                                    <span class="sub-title">{{ __("Amount") }} :{{ get_amount(@$item->details->amount,@$item->details->currency) }}, {{ @$item->details->message }}</span>
                                </div>
                            </li>
                        @endforeach
                    </ul>
                </div>
            </div>
            <div class="header-user-wrapper">
                <div class="header-user-thumb">
                    <a href="{{ setRoute('user.profile.index') }}"><img src="{{ auth()->user()->userImage ?? asset('public/frontend/images/user/user-1.png') }}" alt="client"></a>
                </div>
            </div>
        </div>
    </div>
</div>
@push('script')
<script>
    $("select[name=lang_switcher]").change(function(){
        var selected_value = $(this).val();
        var submitForm = `<form action="{{ setRoute('frontend.languages.switch') }}" id="local_submit" method="POST"> @csrf <input type="hidden" name="target" value="${$(this).val()}" ></form>`;
        $("body").append(submitForm);
        $("#local_submit").submit();
    });
</script>
@endpush
Best Practice

Best Practices

To ensure a smooth integration process and optimal performance, follow these best practices:

  1. Use secure HTTPS connections for all API requests.
  2. Implement robust error handling to handle potential issues gracefully.
  3. Regularly update your integration to stay current with any API changes or enhancements.