“Laravel Blade pendek jika” Kode Jawaban

SHORTHAND PLAVEL Laravel if

<form action="?" method="get" id="sort_form">
                        @foreach($data['sorts'] as $key=> $sort)
                            <th>
                                <a href="{{ route("admin.review.index") }}?{{ $sort['table'] }}={{ (!is_null(request()->get($sort['table'])) && isset($sort['table']) && request()->get($sort['table']) == "desc") ? "asc" : "desc"}}">
                                    {{ $sort['name'] }}
                                    <i class="bi bi-sort-{{ request()->get($sort['table']) == "asc"?"down":"up"}}"></i>
                                </a>
                            </th>
                        @endforeach
                    </form>
Shadow

pisau if

@if (count($records) === 1)
    I have one record!
@elseif (count($records) > 1)
    I have multiple records!
@else
    I don't have any records!
@endif
Xerothermic Xenomorph

Laravel Blade pendek jika

{{  $var === "hello" ? "Hi" : ($var ==="howdie ? "how" : "Goodbye") }}
Shadow

Jawaban yang mirip dengan “Laravel Blade pendek jika”

Pertanyaan yang mirip dengan “Laravel Blade pendek jika”

Lebih banyak jawaban terkait untuk “Laravel Blade pendek jika” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya