@extends('layouts.app') @section('content')

Task Templates

+ New Template
@if($templates->isEmpty())

No templates

Get started by creating a new routine task template.

@else
@foreach($templates as $template)

{{ $template->title }}

@csrf @method('DELETE')

{{ $template->description ?: 'No description provided.' }}

@php $daysMap = [1=>'Mon', 2=>'Tue', 3=>'Wed', 4=>'Thu', 5=>'Fri', 6=>'Sat', 7=>'Sun']; $templateDays = $template->days->pluck('day_of_week')->toArray(); @endphp @foreach($daysMap as $num => $name) {{ $name }} @endforeach
@endforeach
@endif
@endsection