Ga naar content

core/code

Styling wordt bepaald door PrismJS

https://prismjs.com

p { color: red; }
<article card="card">
    <header class="card__header">
        @if(!empty($title))
            <h3 class="card__title h6">{!! $title !!}</h3>
        @endif
        @if(!empty($isPopular))
            <x-badge type="warning">
                {{ __('Populair', 'webreact') }}
            </x-badge>
        @endif
        @if(!empty($isExam))
            <x-badge type="dark">
                {{ __('Alleen examen', 'webreact') }}
            </x-badge>
        @endif
    </header>
    <div class="card__body">
        @if(!empty($price))
            <p class="card__price">{{ sprintf(__('Vanaf %s p.p.', 'webreact'), $price) }}</p>
        @endif
        @if(!empty($link))
            <a class="card__anchor" href="{{ $link }}">
                @svg('btn-icon-arrows', 'card__link-icon')
                <span class="sr-only">{{ __('Meer informatie', 'webreact') }}</span>
            </a>
        @endif
    </div>
</article>
const Livewire = window.Livewire || {}
const Alpine = window.Alpine || {}

Object.assign(window, {
  Livewire: Livewire,
  Alpine: Alpine,
})

if (import.meta.webpackHot) {
  import.meta.webpackHot?.accept(console.error)
}

ready((): void => {
  facetWp()
  animateButton()
  search()
  swiper()
  video()
})
<?php

namespace App\Services;

use App\Models\Scholar\Certificate;
use App\Repositories\CertificateRepository;
use Illuminate\Support\Collection;

class CertificateService
{
    public function __construct(
        private readonly CertificateRepository $repository
    ) {
    }

    public function all(): Collection
    {
        return $this->repository->all();
    }

    public function find(int $id): Certificate
    {
        return $this->repository->find($id);
    }

    public function allOrderByName(): Collection
    {
        return $this->repository->allOrderByName();
    }

    public function allMappedByIdName(): Collection
    {
        return $this->allOrderByName()->mapWithKeys(fn (Certificate $certificate) => [
            $certificate->id => $certificate->name,
        ]);
    }
}

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *