@extends('layouts.app') @section('title', 'Template Pesan') @section('content')
{{-- Template list --}}
Daftar Template ({{ $templates->total() }})
@if($templates->isEmpty())
Belum ada template

Buat template pertama menggunakan form di sebelah kanan

@else
@foreach($templates as $tpl)
{{ $tpl->name }}
{{ Str::limit($tpl->content, 150) }}
{{ ucfirst($tpl->category) }} oleh {{ $tpl->createdBy?->name ?? '—' }}
@csrf @method('DELETE')
@endforeach
@if($templates->hasPages())
{{ $templates->firstItem() }}–{{ $templates->lastItem() }} dari {{ $templates->total() }}
@endif @endif
{{-- Form tambah template --}}
Tambah Template Baru
@csrf

Variable: {nama} untuk nama kontak

@endsection