Skip to content

Commit d4c4675

Browse files
committed
Add frontmatter to home
1 parent 66dec70 commit d4c4675

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

docs/en/index.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1+
---
2+
title: CakePHP 5 Documentation - Build Better Web Applications Faster
3+
description: Official CakePHP 5 documentation. Learn how to build modern PHP web applications with convention over configuration, powerful ORM, built-in security, and rapid development tools.
4+
outline: 2
5+
---
16
# Build Better Web Applications, Faster
27

38
**CakePHP 5** is a modern PHP framework running on PHP |phpversion| (min. PHP |minphpversion|) that helps you write clean, maintainable code without the complexity. Whether you're building a simple blog or a complex enterprise application, CakePHP gives you the tools to get it done right.
49

510
::: tip Perfect for
6-
✅ Developers who value **convention over configuration**
7-
✅ Teams building **secure, scalable applications**
8-
✅ Projects that need to **ship quickly** without sacrificing quality
11+
✅ Developers who value **convention over configuration**
12+
✅ Teams building **secure, scalable applications**
13+
✅ Projects that need to **ship quickly** without sacrificing quality
914
✅ Applications requiring **modern PHP standards** (PSR-7, PSR-15, PSR-17)
1015
:::
1116

1217
## Why CakePHP?
1318

1419
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 2rem 0;">
1520

16-
🚀 **Rapid Development**
21+
🚀 **Rapid Development**
1722
Scaffold applications in minutes with powerful code generation tools.
1823

19-
🔒 **Security First**
24+
🔒 **Security First**
2025
Built-in protection against SQL injection, XSS, CSRF, and more.
2126

22-
📦 **Batteries Included**
27+
📦 **Batteries Included**
2328
ORM, validation, caching, authentication — everything you need out of the box.
2429

25-
🎯 **Convention over Configuration**
30+
🎯 **Convention over Configuration**
2631
Sensible defaults mean less setup, more coding.
2732

2833
</div>
@@ -117,7 +122,7 @@ return [
117122
Choose your preferred approach for creating the database schema:
118123

119124
> [!NOTE]
120-
> **Migrations** are recommended for team projects and production - they're version-controlled and database-agnostic.
125+
> **Migrations** are recommended for team projects and production - they're version-controlled and database-agnostic.
121126
> **Raw SQL** is fine for quick prototyping or if you prefer direct database control.
122127
123128
#### Option A: Using Migrations
@@ -289,11 +294,11 @@ class ArticlesTable extends Table
289294
public function initialize(array $config): void
290295
{
291296
parent::initialize($config);
292-
297+
293298
$this->setTable('articles');
294299
$this->setDisplayField('title');
295300
$this->setPrimaryKey('id');
296-
301+
297302
$this->addBehavior('Timestamp');
298303
}
299304
}
@@ -343,37 +348,37 @@ class ArticlesController extends AppController
343348
$articles = $this->Articles->find('all')
344349
->where(['published' => true])
345350
->orderBy(['created' => 'DESC']);
346-
351+
347352
$this->set(compact('articles'));
348353
}
349-
354+
350355
public function view(?string $slug = null): void
351356
{
352357
$article = $this->Articles
353358
->findBySlug($slug)
354359
->firstOrFail();
355-
360+
356361
$this->set(compact('article'));
357362
}
358-
363+
359364
public function add(): void
360365
{
361366
$article = $this->Articles->newEmptyEntity();
362-
367+
363368
if ($this->request->is('post')) {
364369
$article = $this->Articles->patchEntity(
365370
$article,
366371
$this->request->getData()
367372
);
368-
373+
369374
if ($this->Articles->save($article)) {
370375
$this->Flash->success('Article saved!');
371376
return $this->redirect(['action' => 'index']);
372377
}
373-
378+
374379
$this->Flash->error('Unable to save article.');
375380
}
376-
381+
377382
$this->set(compact('article'));
378383
}
379384
}
@@ -640,4 +645,4 @@ bin/cake bake all Articles
640645
<a href="tutorials-and-examples" style="color: white; text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 2px;">View Examples</a>
641646
</p>
642647

643-
</div>
648+
</div>

0 commit comments

Comments
 (0)