2 years ago

#65793

test-img

Galaksi

Laravel If === statement working on localhost but not works on server

I'm searching and trying to fix this problem while 3 days but I can't did anything. I have a project coded with Laravel 8. I'm not new for this subject but my if statements working correctly on localhost but not working correctly on shared-hosting. Main problem is I'm using === in if statement, its working on local; but this statement not working after deployment. At the same time, I'm changing === to == then it's working. I don't want to change all of them. I'm leaving the sample page and my htaccess below. If you can help me, would be so glad.

What am I did while to now?

  • Classic PHP artisan commands (like as config:clear)
  • Check the htaccess file
  • Change PHP version from 7.3 or 7.4 to 8.0
  • Check auth()->user()->level not empty

Here is the sample page:

@extends('layout')
@section('title', 'Dashboard')
@section('description', 'Dashboard')

@section('css-vendors')
<link href="{{ asset('assets/plugins/custom/leaflet/leaflet.bundle.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/plugins/custom/datatables/datatables.bundle.css') }}" rel="stylesheet" type="text/css"/>
@endsection

@if((auth()->user()->level === 1) || (auth()->user()->level === 2))
@section('content')
<!--begin::Row-->
<div class="row g-5 g-xl-8">
    <div class="col-xl-3">
        <!--begin::Statistics Widget 5-->
        <a href="#" class="card bg-body hoverable card-xl-stretch mb-xl-8">
            <!--begin::Body-->
            <div class="card-body">
                <!--begin::Svg Icon | path: icons/duotune/general/gen032.svg-->
                <span class="svg-icon svg-icon-primary svg-icon-3x ms-n1">
                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
                        <rect x="8" y="9" width="3" height="10" rx="1.5" fill="black" />
                        <rect opacity="0.5" x="13" y="5" width="3" height="14" rx="1.5" fill="black" />
                        <rect x="18" y="11" width="3" height="8" rx="1.5" fill="black" />
                        <rect x="3" y="13" width="3" height="6" rx="1.5" fill="black" />
                    </svg>
                </span>
                <!--end::Svg Icon-->
                <div class="text-gray-900 fw-bolder fs-2 mb-2 mt-5">$207.450 <span class="fs-6 fw-bold text-gray-400">Total Earning</span></div>
                <div class="span w-100 h-1px bg-gray-300 mt-5"></div>
                <div class="text-gray-900 fw-bolder fs-2 mb-2 mt-5">$50.236 <span class="fs-6 fw-bold text-gray-400">Estimated</span></div>
                <div class="text-gray-900 fw-bolder fs-2 mb-2 mt-5">$87.014 <span class="fs-6 fw-bold text-gray-400">Billed</span></div>
                <div class="text-gray-900 fw-bolder fs-2 mb-2 mt-5">$70.200 <span class="fs-6 fw-bold text-gray-400">Paid</span></div>
            </div>
            <!--end::Body-->
        </a>
        <!--end::Statistics Widget 5-->
    </div>
    <div class="col-xl-3">
        <!--begin::Statistics Widget 5-->
        <a href="#" class="card bg-dark hoverable card-xl-stretch mb-xl-8">
            <!--begin::Body-->
            <div class="card-body">
                <!--begin::Svg Icon | path: icons/duotune/ecommerce/ecm008.svg-->
                <span class="svg-icon svg-icon-gray-100 svg-icon-3x ms-n1">
                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
                        <path opacity="0.3" d="M18 21.6C16.3 21.6 15 20.3 15 18.6V2.50001C15 2.20001 14.6 1.99996 14.3 2.19996L13 3.59999L11.7 2.3C11.3 1.9 10.7 1.9 10.3 2.3L9 3.59999L7.70001 2.3C7.30001 1.9 6.69999 1.9 6.29999 2.3L5 3.59999L3.70001 2.3C3.50001 2.1 3 2.20001 3 3.50001V18.6C3 20.3 4.3 21.6 6 21.6H18Z" fill="black" />
                        <path d="M12 12.6H11C10.4 12.6 10 12.2 10 11.6C10 11 10.4 10.6 11 10.6H12C12.6 10.6 13 11 13 11.6C13 12.2 12.6 12.6 12 12.6ZM9 11.6C9 11 8.6 10.6 8 10.6H6C5.4 10.6 5 11 5 11.6C5 12.2 5.4 12.6 6 12.6H8C8.6 12.6 9 12.2 9 11.6ZM9 7.59998C9 6.99998 8.6 6.59998 8 6.59998H6C5.4 6.59998 5 6.99998 5 7.59998C5 8.19998 5.4 8.59998 6 8.59998H8C8.6 8.59998 9 8.19998 9 7.59998ZM13 7.59998C13 6.99998 12.6 6.59998 12 6.59998H11C10.4 6.59998 10 6.99998 10 7.59998C10 8.19998 10.4 8.59998 11 8.59998H12C12.6 8.59998 13 8.19998 13 7.59998ZM13 15.6C13 15 12.6 14.6 12 14.6H10C9.4 14.6 9 15 9 15.6C9 16.2 9.4 16.6 10 16.6H12C12.6 16.6 13 16.2 13 15.6Z" fill="black" />
                        <path d="M15 18.6C15 20.3 16.3 21.6 18 21.6C19.7 21.6 21 20.3 21 18.6V12.5C21 12.2 20.6 12 20.3 12.2L19 13.6L17.7 12.3C17.3 11.9 16.7 11.9 16.3 12.3L15 13.6V18.6Z" fill="black" />
                    </svg>
                </span>
                <!--end::Svg Icon-->
                <div class="text-gray-100 fw-bolder fs-2 mb-2 mt-5">{{ $users->count_total }} <span class="fw-bold fs-6">Total Member</span></div>
                <div class="span w-100 h-1px bg-white opacity-50 mt-5"></div>
                <div class="text-gray-100 fw-bolder fs-2 mb-2 mt-5">{{ $users->count_staff }} <span class="fw-bold fs-6">Staff Member</span></div>
                <div class="text-gray-100 fw-bolder fs-2 mb-2 mt-5">{{ $users->count_hr }} <span class="fw-bold fs-6">HR Personel</span></div>
                <div class="text-gray-100 fw-bolder fs-2 mb-2 mt-5">{{ $users->count_employee }} <span class="fw-bold fs-6">Employee</span></div>
            </div>
            <!--end::Body-->
        </a>
        <!--end::Statistics Widget 5-->
    </div>
    <div class="col-xl-3">
        <!--begin::Statistics Widget 5-->
        <a href="#" class="card bg-warning hoverable card-xl-stretch mb-xl-8">
            <!--begin::Body-->
            <div class="card-body">
                <!--begin::Svg Icon | path: icons/duotune/finance/fin006.svg-->
                <span class="svg-icon svg-icon-white svg-icon-3x ms-n1">
                    <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 15H4C2.9 15 2 14.1 2 13V7C2 6.4 2.4 6 3 6H21C21.6 6 22 6.4 22 7V13C22 14.1 21.1 15 20 15ZM13 12H11C10.5 12 10 12.4 10 13V16C10 16.5 10.4 17 11 17H13C13.6 17 14 16.6 14 16V13C14 12.4 13.6 12 13 12Z" fill="black" />
                        <path d="M14 6V5H10V6H8V5C8 3.9 8.9 3 10 3H14C15.1 3 16 3.9 16 5V6H14ZM20 15H14V16C14 16.6 13.5 17 13 17H11C10.5 17 10 16.6 10 16V15H4C3.6 15 3.3 14.9 3 14.7V18C3 19.1 3.9 20 5 20H19C20.1 20 21 19.1 21 18V14.7C20.7 14.9 20.4 15 20 15Z" fill="black" />
                    </svg>
                </span>
                <!--end::Svg Icon-->
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">{{ $applications->count_total }} <span class="fw-bold text-white fs-6">Total Applications</span></div>
                <div class="span w-100 h-1px bg-white opacity-50 mt-5"></div>
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">{{ $applications->count_new }} <span class="fw-bold text-white fs-6">New</span></div>
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">{{ $applications->count_continues }} <span class="fw-bold text-white fs-6">Continues</span></div>
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">{{ $applications->count_finished }} <span class="fw-bold text-white fs-6">Finished</span></div>
            </div>
            <!--end::Body-->
        </a>
        <!--end::Statistics Widget 5-->
    </div>
    <div class="col-xl-3">
        <!--begin::Statistics Widget 5-->
        <a href="#" class="card bg-info hoverable card-xl-stretch mb-xl-8">
            <!--begin::Body-->
            <div class="card-body">
                <!--begin::Svg Icon | path: icons/duotune/graphs/gra007.svg-->
                <span class="svg-icon svg-icon-white svg-icon-3x ms-n1">
                    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
                        <path opacity="0.3" d="M10.9607 12.9128H18.8607C19.4607 12.9128 19.9607 13.4128 19.8607 14.0128C19.2607 19.0128 14.4607 22.7128 9.26068 21.7128C5.66068 21.0128 2.86071 18.2128 2.16071 14.6128C1.16071 9.31284 4.96069 4.61281 9.86069 4.01281C10.4607 3.91281 10.9607 4.41281 10.9607 5.01281V12.9128Z" fill="black" />
                        <path d="M12.9607 10.9128V3.01281C12.9607 2.41281 13.4607 1.91281 14.0607 2.01281C16.0607 2.21281 17.8607 3.11284 19.2607 4.61284C20.6607 6.01284 21.5607 7.91285 21.8607 9.81285C21.9607 10.4129 21.4607 10.9128 20.8607 10.9128H12.9607Z" fill="black" />
                    </svg>
                </span>
                <!--end::Svg Icon-->
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">1018 <span class="fs-6 fw-bold text-white">Total Tickets</span></div>
                <div class="span w-100 h-1px bg-white opacity-50 mt-5"></div>
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">287 <span class="fs-6 fw-bold text-white">Unanswered</span></div>
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">510 <span class="fs-6 fw-bold text-white">Continues</span></div>
                <div class="text-white fw-bolder fs-2 mb-2 mt-5">221 <span class="fs-6 fw-bold text-white">Closed</span></div>
            </div>
            <!--end::Body-->
        </a>
        <!--end::Statistics Widget 5-->
    </div>
    <!--begin::Col-->
    <div class="col-xl-12">
        <!--begin::Tables Widget 9-->
        <div class="card card-xl-stretch mb-5 mb-xl-8">
            <!--begin::Header-->
            <div class="card-header border-0 pt-5">
                <h3 class="card-title align-items-start flex-column">
                    <span class="card-label fw-bolder fs-3 mb-1">Last Applications</span>
                    <span class="text-muted mt-1 fw-bold fs-7">Just unopened</span>
                </h3>
            </div>
            <!--end::Header-->
            <!--begin::Body-->
            <div class="card-body py-3">
                <!--begin::Table container-->
                <div class="table-responsive">
                    <!--begin::Table-->
                    <table class="table table-row-dashed table-row-gray-300 align-middle gs-0 gy-4" id="homeTable">
                        <!--begin::Table head-->
                        <thead>
                        <tr class="fw-bolder text-muted">
                            <th class="min-w-1250px">Applicant</th>
                            <th class="win-w-50px">Releated Company</th>
                            <th class="min-w-50px">Visa Type</th>
                            <th class="min-w-50px">Child <span class="mx-1">/</span> Spouse</th>
                            <th class="min-w-50px">Contact Email</th>
                            <th class="min-w-50px">Status</th>
                            <th class="min-w-50px text-end">Actions</th>
                        </tr>
                        </thead>
                        <!--end::Table head-->
                        <!--begin::Table body-->
                        <tbody>
                        @foreach($applications as $application)
                            <tr>
                                <td>
                                    <div class="d-flex align-items-center">
                                        <div class="d-flex justify-content-start flex-column">
                                            <a href="{{ route('userShow', $application->user_id) }}" class="text-dark fw-bolder text-hover-primary fs-6">{{ $application->full_name }} </a>
                                            <span class="text-muted fw-bold text-muted d-block fs-7">{{ \App\Models\Position::find(\App\Models\User::find($application->user_id)->position)->name }}</span>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    <div class="d-flex align-items-center">
                                        <div class="d-flex justify-content-start flex-column">
                                            <a href="{{ route('companiesShow',  \App\Models\Company::find(\App\Models\User::find($application->user_id)->company)->id) }}" class="text-dark fw-bolder text-hover-primary fs-6">{{ \App\Models\Company::find(\App\Models\User::find($application->user_id)->company)->name }} </a>
                                            <span class="text-muted fw-bold text-muted d-block fs-7">{{ \App\Models\Company::find(\App\Models\User::find($application->user_id)->company)->type }}</span>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                <span class="
                                    @if($application->type === 'visit')
                                    text-success
                                    @elseif($application->type === 'study')
                                    text-info
                                    @elseif($application->type === 'work')
                                    text-warning
                                    @elseif($application->type === 'immigration')
                                    text-danger
                                    @elseif($application->type === 'permanent')
                                    text-primary
                                    @else
                                    text-muted
                                    @endif
                                    fw-bold fs-6">
                                    {{ ucfirst($application->type) }} Visa</span>
                                </td>
                                <td class="align-items-center">
                                    @if($application->have_children === 1)
                                        <span class="badge badge-light-success">Yes</span>
                                    @else
                                        <span class="badge badge-light-danger">No</span>
                                    @endif
                                    <span class="text-muted mx-1 fw-bold fs-7">/</span>
                                    @if($application->have_spouse === 1)
                                        <span class="badge badge-light-success">Yes</span>
                                    @else
                                        <span class="badge badge-light-danger">No</span>
                                    @endif

                                </td>
                                <td>
                                    <span class="text-muted fw-bold fs-7">{{ \App\Models\User::find($application->user_id)->email }}</span>
                                </td>
                                <td>
                                    @if($application->status === 0)
                                        <span class="badge badge-light-dark" title="{{ $application->updated_at }}">Company approval awaited</span>
                                    @elseif($application->status === 1)
                                        <span class="badge badge-info" title="{{ $application->updated_at }}">Staff approval awaited</span>
                                    @elseif($application->status === 2)
                                        <span class="badge badge-danger" title="{{ $application->updated_at }}">Rejected</span>
                                    @elseif($application->status === 3)
                                        <span class="badge badge-success" title="{{ $application->updated_at }}">Approved</span>
                                    @elseif($application->status === 4)
                                        <span class="badge badge-primary" title="{{ $application->updated_at }}">Finished</span>
                                    @else
                                        <span class="badge badge-light-danger">Unknown, N/A</span>
                                    @endif
                                </td>
                                <td>
                                    <div class="d-flex justify-content-end flex-shrink-0">
                                        <a href="{{ route('applicationsShow', $application->id) }}" class="btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1">
                                            <!--begin::Svg Icon | path: icons/duotune/general/gen019.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="M22 12C22 17.5 17.5 22 12 22C6.5 22 2 17.5 2 12C2 6.5 6.5 2 12 2C17.5 2 22 6.5 22 12ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10ZM6.39999 9.89999C6.99999 8.19999 8.40001 6.9 10.1 6.4C10.6 6.2 10.9 5.7 10.7 5.1C10.5 4.6 9.99999 4.3 9.39999 4.5C7.09999 5.3 5.29999 7 4.39999 9.2C4.19999 9.7 4.5 10.3 5 10.5C5.1 10.5 5.19999 10.6 5.39999 10.6C5.89999 10.5 6.19999 10.2 6.39999 9.89999ZM14.8 19.5C17 18.7 18.8 16.9 19.6 14.7C19.8 14.2 19.5 13.6 19 13.4C18.5 13.2 17.9 13.5 17.7 14C17.1 15.7 15.8 17 14.1 17.6C13.6 17.8 13.3 18.4 13.5 18.9C13.6 19.3 14 19.6 14.4 19.6C14.5 19.6 14.6 19.6 14.8 19.5Z" fill="black"/>
                                                <path d="M16 12C16 14.2 14.2 16 12 16C9.8 16 8 14.2 8 12C8 9.8 9.8 8 12 8C14.2 8 16 9.8 16 12ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z" fill="black"/>
                                            </svg>
                                        </span>
                                            <!--end::Svg Icon-->
                                        </a>
                                        <a href="{{ route('applicationsEdit', $application->id) }}" class="btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1">
                                            <!--begin::Svg Icon | path: icons/duotune/art/art005.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="M21.4 8.35303L19.241 10.511L13.485 4.755L15.643 2.59595C16.0248 2.21423 16.5426 1.99988 17.0825 1.99988C17.6224 1.99988 18.1402 2.21423 18.522 2.59595L21.4 5.474C21.7817 5.85581 21.9962 6.37355 21.9962 6.91345C21.9962 7.45335 21.7817 7.97122 21.4 8.35303ZM3.68699 21.932L9.88699 19.865L4.13099 14.109L2.06399 20.309C1.98815 20.5354 1.97703 20.7787 2.03189 21.0111C2.08674 21.2436 2.2054 21.4561 2.37449 21.6248C2.54359 21.7934 2.75641 21.9115 2.989 21.9658C3.22158 22.0201 3.4647 22.0084 3.69099 21.932H3.68699Z" fill="black" />
                                                <path d="M5.574 21.3L3.692 21.928C3.46591 22.0032 3.22334 22.0141 2.99144 21.9594C2.75954 21.9046 2.54744 21.7864 2.3789 21.6179C2.21036 21.4495 2.09202 21.2375 2.03711 21.0056C1.9822 20.7737 1.99289 20.5312 2.06799 20.3051L2.696 18.422L5.574 21.3ZM4.13499 14.105L9.891 19.861L19.245 10.507L13.489 4.75098L4.13499 14.105Z" fill="black" />
                                            </svg>
                                        </span>
                                            <!--end::Svg Icon-->
                                        </a>
                                        <a href="{{ route('applicationsDelete',$application->id) }}" class="btn btn-icon btn-bg-light btn-active-color-primary btn-sm">
                                            <!--begin::Svg Icon | path: icons/duotune/general/gen027.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 d="M5 9C5 8.44772 5.44772 8 6 8H18C18.5523 8 19 8.44772 19 9V18C19 19.6569 17.6569 21 16 21H8C6.34315 21 5 19.6569 5 18V9Z" fill="black" />
                                                <path opacity="0.5" d="M5 5C5 4.44772 5.44772 4 6 4H18C18.5523 4 19 4.44772 19 5V5C19 5.55228 18.5523 6 18 6H6C5.44772 6 5 5.55228 5 5V5Z" fill="black" />
                                                <path opacity="0.5" d="M9 4C9 3.44772 9.44772 3 10 3H14C14.5523 3 15 3.44772 15 4V4H9V4Z" fill="black" />
                                            </svg>
                                        </span>
                                            <!--end::Svg Icon-->
                                        </a>
                                    </div>
                                </td>
                            </tr>
                        @endforeach
                        </tbody>
                        <!--end::Table body-->
                    </table>
                    <!--end::Table-->
                </div>
                <!--end::Table container-->
            </div>
            <!--begin::Body-->
        </div>
        <!--end::Tables Widget 9-->
    </div>
    <!--end::Col-->
</div>
<!--end::Row-->
<!--begin::Row-->
<div class="row gy-5 g-xl-8">
    <!--begin::Col-->
    <div class="col-xl-6">
        <!--begin::List Widget 4-->
        <div class="card mh-500px mb-5 mb-xl-8">
            <!--begin::Header-->
            <div class="card-header border-0 pt-5">
                <h3 class="card-title align-items-start flex-column">
                    <span class="card-label fw-bolder text-dark">Invoices</span>
                    <span class="text-muted mt-1 fw-bold fs-7">Last 10 happen invoices</span>
                </h3>
            </div>
            <!--end::Header-->
            <!--begin::Body-->
            <div class="card-body overflow-scroll pt-5">
                @foreach($invoices as $invoice)
                <!--begin::Item-->
                <div class="d-flex align-items-sm-center mb-7">
                    <!--begin::Symbol-->
                    <div class="symbol symbol-50px me-5">
                        <span class="symbol-label">
                            <img src="{{ asset('storage/'.$invoice->company->logo) }}" class="h-50 align-self-center" style="object-fit: contain" alt="{{ $invoice->company->name }}" />
                        </span>
                    </div>
                    <!--end::Symbol-->
                    <!--begin::Section-->
                    <div class="d-flex align-items-center flex-row-fluid flex-wrap">
                        <div class="flex-grow-1 me-2">
                            <a href="{{ route('invoiceShow', $invoice->id) }}" target="_blank" class="text-gray-800 text-hover-primary fs-7 fw-bolder">{{ ucfirst($invoice->application->type) }} Visa Application for {{ $invoice->application->full_name }}</a>
                            <span class="text-muted fw-bold d-block fs-7">Related Company: <a href="{{ route('companiesShow', $invoice->company->id) }}" class="text-muted text-hover-primary">{{ $invoice->company->name }}</a></span>
                        </div>
                        <span class="badge badge-light fw-bolder my-2">${{ $invoice->total }}</span>
                    </div>
                    <!--end::Section-->
                </div>
                <!--end::Item-->
                @if(($loop->count > 1) && $loop->last)
                <!--begin::Item-->
                <div class="d-flex align-items-sm-center">
                        <!--begin::Symbol-->
                        <div class="symbol symbol-50px me-5">
                    <span class="symbol-label">
                        <img src="{{ asset('storage/'.$invoice->company->logo) }}" class="h-50 align-self-center" style="object-fit: contain" alt="{{ $invoice->company->name }}" />
                    </span>
                        </div>
                        <!--end::Symbol-->
                        <!--begin::Section-->
                        <div class="d-flex align-items-center flex-row-fluid flex-wrap">
                            <div class="flex-grow-1 me-2">
                                <a href="{{ route('invoiceShow', $invoice->id) }}" target="_blank" class="text-gray-800 text-hover-primary fs-7 fw-bolder">{{ ucfirst($invoice->application->type) }} Visa Application for {{ $invoice->application->full_name }}</a>
                                <span class="text-muted fw-bold d-block fs-7">Related Company: <a href="{{ route('companiesShow', $invoice->company->id) }}" class="text-muted text-hover-primary">{{ $invoice->company->name }}</a></span>
                            </div>
                            <span class="badge badge-light fw-bolder my-2">${{ $invoice->total }}</span>
                        </div>
                        <!--end::Section-->
                    </div>
                <!--end::Item-->
                @endif
                @endforeach
            </div>
            <!--end::Body-->
        </div>
        <!--end::List Widget 4-->
    </div>
    <!--end::Col-->
    <!--begin::Col-->
    <div class="col-xl-6">
        <!--begin::List Widget 5-->
        <div class="card mh-500px mb-xl-8">
            <!--begin::Header-->
            <div class="card-header align-items-center border-0 mt-4">
                <h3 class="card-title align-items-start flex-column">
                    <span class="fw-bolder mb-2 text-dark">Transactions</span>
                    <span class="text-muted fw-bold fs-7">Listing last 20 transaction records in here</span>
                </h3>
            </div>
            <!--end::Header-->
            <!--begin::Body-->
            <div class="card-body overflow-scroll pt-5">
                <!--begin::Timeline-->
                <div class="timeline-label">
                    @foreach($payments as $payment)
                    <!--begin::Item-->
                    <div class="timeline-item">
                        <!--begin::Label-->
                        <div class="timeline-label fw-bolder text-gray-800 fs-6">{{ date('H:i', strtotime($payment->created_at)) }}</div>
                        <!--end::Label-->
                        <!--begin::Badge-->
                        <div class="timeline-badge">
                            @if($payment->type === 'visit')
                            <i class="fa fa-genderless text-success fs-1"></i>
                            @elseif($payment->type === 'study')
                            <i class="fa fa-genderless text-info fs-1"></i>
                            @elseif($payment->type === 'work')
                            <i class="fa fa-genderless text-warning fs-1"></i>
                            @elseif($payment->type === 'immigration')
                            <i class="fa fa-genderless text-danger fs-1"></i>
                            @elseif($payment->type === 'permanent')
                            <i class="fa fa-genderless text-primary fs-1"></i>
                            @endif
                        </div>
                        <!--end::Badge-->
                        <!--begin::Text-->
                        <div class="fw-normal timeline-content text-muted ps-3" title="{{ $payment->description }}">{{ \Illuminate\Support\Str::limit($payment->description, 125) }}</div>
                        <!--end::Text-->
                    </div>
                    <!--end::Item-->
                    @endforeach
                </div>
                <!--end::Timeline-->
            </div>
            <!--end: Card Body-->
        </div>
        <!--end: List Widget 5-->
    </div>
    <!--end::Col-->
</div>
<!--end::Row-->
@endsection
@endif
etc...

php

laravel

deployment

laravel-blade

0 Answers

Your Answer

Accepted video resources