PHPackages                             drago-ex/simple - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. drago-ex/simple

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

drago-ex/simple
===============

Easy configuration for single-page sites.

v2.0.0(1mo ago)01691MITPHPPHP &gt;=8.3 &lt;9CI passing

Since Oct 9Pushed 1w ago1 watchersCompare

[ Source](https://github.com/drago-ex/simple)[ Packagist](https://packagist.org/packages/drago-ex/simple)[ RSS](/packages/drago-ex-simple/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (13)Versions (11)Used By (1)

Drago Simple
============

[](#drago-simple)

Easy configuration for single-page sites.

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://github.com/drago-ex/simple/blob/master/license)[![PHP version](https://camo.githubusercontent.com/7e0752c3d5fce82a19f2d210f213ad8ea3ee51dff119c859d22b3ba0e5b05a9c/68747470733a2f2f62616467652e667572792e696f2f70682f647261676f2d657825324673696d706c652e737667)](https://badge.fury.io/ph/drago-ex%2Fsimple)[![Tests](https://github.com/drago-ex/simple/actions/workflows/tests.yml/badge.svg)](https://github.com/drago-ex/simple/actions/workflows/tests.yml)[![Coding Style](https://github.com/drago-ex/simple/actions/workflows/coding-style.yml/badge.svg)](https://github.com/drago-ex/simple/actions/workflows/coding-style.yml)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.3
- Nette Framework
- Composer

Installation
------------

[](#installation)

```
composer require drago-ex/simple

```

Traits
------

[](#traits)

### Knowledge

[](#knowledge)

- [Latte: amazing template engine for PHP](https://github.com/nette/latte)
- [RobotLoader: comfortable autoloading](https://github.com/nette/robot-loader)
- [Nette HTTP Component](https://github.com/nette/http)
- [Tracy - PHP debugger](https://github.com/nette/tracy)

### Session Trait

[](#session-trait)

```
use Drago\Simple\Base\Session;

// Get session instance
$this->session();
```

### Message Trait

[](#message-trait)

```
use Drago\Simple\Base\Message;

// Save message to session
$this->flashMessage('Message...');

// Retrieve flash message from session
$this->getFlashMessage();
```

### Response Trait

[](#response-trait)

```
use Drago\Simple\Base\Response;

// Redirect to a URL
$this->redirect('#');
```

### Controller Example

[](#controller-example)

```
final class Home
{
    private Latte\Engine $latte;

    public function __construct(Latte\Engine $latte)
    {
        $this->latte = $latte;
    }
}
```

### Template Rendering

[](#template-rendering)

```
public function render(): void
{
    $this->latte->render(__DIR__ . '/path/to/dir/template.latte');
}
```

### Passing Parameters to Templates

[](#passing-parameters-to-templates)

```
public function render(): void
{
    $this->flashMessage('message...');
    $message['message'] = $this->getFlashMessage();
    $this->latte->render(__DIR__ . '/path/to/dir/template.latte', $message);
}
```

### Template: Print Message

[](#template-print-message)

```
{$message}
```

### Template: Default Parameter for Include Files

[](#template-default-parameter-for-include-files)

```
{$basePath}
```

### Forms

[](#forms)

Install Nette Forms via Composer:

```
composer require nette/forms

```

### Forms Latte Macro

[](#forms-latte-macro)

```
$latte->onCompile[] = function () use ($latte) {
	FormMacros::install($latte->getCompiler());
};
```

### Translator

[](#translator)

Install the Translator via Composer:

```
composer require drago-ex/translator

```

### Translator Property

[](#translator-property)

```
private array $lang = ['en', 'cs'];
```

### Translator Language Detection

[](#translator-language-detection)

```
$translator = new Translator(__DIR__ . '/locale');
$translator->setTranslate((new RequestFactory())->fromGlobals()
	->detectLanguage($this->lang)
);
```

### Translator Latte Filter

[](#translator-latte-filter)

```
$latte->addFilter('translate', function ($message) use ($translator) {
	return $translator->translate($message);
});
```

### Prepared Package for Simple Project

[](#prepared-package-for-simple-project)

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance95

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~268 days

Recently: every ~256 days

Total

10

Last Release

41d ago

Major Versions

v1.0.11 → v2.0.02026-05-22

PHP version history (6 changes)v1.0.0PHP &gt;=7.1

v1.0.2PHP &gt;=7.4

v1.0.3PHP &gt;=8.0

v1.0.5PHP &gt;=8.1

v1.0.10PHP &gt;=8.1 &lt;8.4

v1.0.11PHP &gt;=8.3 &lt;9

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5998929?v=4)[Zdeněk Papučík](/maintainers/accgit)[@accgit](https://github.com/accgit)

---

Top Contributors

[![accgit](https://avatars.githubusercontent.com/u/5998929?v=4)](https://github.com/accgit "accgit (114 commits)")

---

Tags

lattenettesimple-pagetracy

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/drago-ex-simple/health.svg)

```
[![Health](https://phpackages.com/badges/drago-ex-simple/health.svg)](https://phpackages.com/packages/drago-ex-simple)
```

###  Alternatives

[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

911.7M6](/packages/nette-code-checker)[nette/web-project

Nette: Standard Web Project

10993.3k](/packages/nette-web-project)[tomaj/nette-api

Nette api

36273.2k7](/packages/tomaj-nette-api)[contributte/forms-wizard

Wizard component for nette/forms

15791.1k](/packages/contributte-forms-wizard)[efabrica/phpstan-latte

4511.9k](/packages/efabrica-phpstan-latte)[uestla/twigrid

Experimental DataGrid for Nette Framework

1712.4k2](/packages/uestla-twigrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
