Veldora templates end with .veldora.php and live in resources/views/. They provide clean syntax and compile to pure PHP without runtime overhead.
Outputting Variables
template.veldora.php
HTML
<!-- Escaped output (prevents XSS) -->
<h1>{{ $post->title }}</h1>
<!-- Raw unescaped HTML -->
<div>{!! $post->content_html !!}</div>Control Directives
template.veldora.php
HTML
<!-- Conditionals -->
@if($user->isAdmin())
<span class="badge">Admin</span>
@elseif($user->isEditor())
<span class="badge">Editor</span>
@else
<span>Member</span>
@endif
<!-- Loops -->
@foreach($posts as $post)
<div class="card">
<h3>{{ $post->title }}</h3>
</div>
@endforeach
<!-- Forelse with fallback -->
@forelse($comments as $comment)
<p>{{ $comment->body }}</p>
@empty
<p>No comments yet.</p>
@endforelse
<!-- Auth state checks -->
@auth
<a href="/dashboard">Dashboard</a>
<a href="/logout">Logout</a>
@endauth
@guest
<a href="/login">Login</a>
<a href="/register">Register</a>
@endguestLayout Inheritance & Yields
Create a parent layout in resources/views/layouts/app.veldora.php:
template.veldora.php
HTML
<!DOCTYPE html>
<html>
<head>
<title>@yield('title', 'My Application')</title>
</head>
<body>
<header>
<nav><!-- navigation links --></nav>
</header>
<main>
@yield('content')
</main>
<footer>© {{ date('Y') }} Veldora</footer>
</body>
</html>Extend it in your page views:
template.veldora.php
HTML
@extends('layouts.app')
@section('title', 'Blog Posts')
@section('content')
<h1>All Posts</h1>
<!-- Page content here -->
@endsectionReusable UI Components
Use the <x-component-name> syntax to render reusable components:
template.veldora.php
HTML
<x-button variant="primary" size="lg">Save Changes</x-button>
<x-card title="Account Settings">
<x-input name="username" label="Username" value="{{ $user->name }}" />
</x-card>