No prior PHPue experience needed! We'll walk through creating a simple welcome page step by step.
A clean welcome page with dynamic content and styling
This is your main application file. Think of it as the controller that manages your entire app.
Each .pvue file in the views folder becomes a page in your app. This is where you build your user interface.
If any P-Directives break, just fall back to PHP! P-Directives are meant for basic use and not as a replacement for PHP.
p-if="$isAvailable"
<?php if($isAvailable): ?> ... <?php endif; ?>
p-for="$item in $items"
<?php foreach($items as $item): ?> ... <?php endforeach; ?>
{{$variable}}
<template>: <?= htmlspecialchars($variable) ?>
<cscript>: <?= json_encode($variable) ?>
// Write normal PHP code here
<?php if($isAvailable): ?>
<div>Content</div>
<?php endif; ?>
<?php if($isAvailable): ?>
console.log("Conditional JS");
<?php endif; ?>
When you run your app, this is exactly what you'll see in the browser.
A modern PHP framework with Vue-like syntax
🎉 This is powered by the exact code we just explored!
Learn how to customize colors, layouts, and make your app look exactly how you want.
Dive deeper with the full PHPue documentation. Find advanced features and examples.
You now understand the basics of PHPue and have seen how easy it is to create a beautiful, functional web app.