takielias / tablar

Tablar: A Laravel Dashboard Preset Based on Tabler HTML Template + Vite. https://tablar.ebuz.xyz/docs
https://tablar.ebuz.xyz
MIT License
281 stars 32 forks source link

Livewire 3 layout #68

Open mjhcremer opened 3 months ago

mjhcremer commented 3 months ago

The documentation says that the package works with Livewire. But in the documentation I cannot find any explanation how to implement it with Livewire 3 that needs a layout blade file. If I use Livewire for full page components how must it be implemented

takielias commented 3 months ago

@mjhcremer

@extends('tablar::page')

@section('content')
    <!-- Page header -->
    <div class="page-header d-print-none">
        <div class="container-xl">
            <div class="row g-2 align-items-center">
                <div class="col">
                    <!-- Page pre-title -->
                    <div class="page-pretitle">
                        Livewire
                    </div>
                    <h2 class="page-title">
                        Dashboard
                    </h2>
                </div>
                <!-- Page title actions -->
            </div>
        </div>
    </div>
    <!-- Page body -->
    <div class="page-body">
        <div class="container-xl">
            <div class="row row-deck row-cards">
                <div class="col-12">
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title">Livewire</h3>
                        </div>
                        <div class="card-body border-bottom py-3">
                            {{$slot}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

Put this as your Layout file & try.