PHPackages                             concur/twig-resource - 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. [Templating &amp; Views](/categories/templating)
4. /
5. concur/twig-resource

ActiveLibrary[Templating &amp; Views](/categories/templating)

concur/twig-resource
====================

Resource handling for Twig templates

01.8kPHP

Since Sep 22Pushed 8y ago2 watchersCompare

[ Source](https://github.com/phpconcur/twig-resource)[ Packagist](https://packagist.org/packages/concur/twig-resource)[ RSS](/packages/concur-twig-resource/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

TwigResource
============

[](#twigresource)

Resource handling for Twig templates

Example Template
----------------

[](#example-template)

*index.php*

```
$loader = new Twig_Loader_Filesystem('/path/to/templates');
$twig = new Twig_Environment($loader);
$twig->addExtension ( new Concur\Resource\Twig () );
echo $twig->render('home.twig');
```

*base.twig*

```
>

{% resource CSS '/css/bootstrap.min.css' %}
{% resource CSS '/css/bootstrap-theme.min.css' %}
{% resource JS '/js/jquery.min.js' %}
{% resource JS '/js/bootstrap.min.js' %}

{% for c in ResourceList('CSS')  %}

{% endfor %}

{% block body %}
{% endblock %}

{% for s in ResourceList('JS') %}

{% endfor %}

```

*home.twig*

```
{% extends "base.twig" %}
{% resource CSS '/css/home.css' %}
{% resource JS '/js/home.js' %}

{% block body %}

  HOME PAGE

{% endblock %}
```

*render*

```
>

    HOME PAGE

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/816019bc6058b9fb9943e9c9dd51f96030da9fa3cae0f3a0dca0b16fdc300922?d=identicon)[darkaxi0m](/maintainers/darkaxi0m)

---

Top Contributors

[![DarkAxi0m](https://avatars.githubusercontent.com/u/1772922?v=4)](https://github.com/DarkAxi0m "DarkAxi0m (12 commits)")

### Embed Badge

![Health badge](/badges/concur-twig-resource/health.svg)

```
[![Health](https://phpackages.com/badges/concur-twig-resource/health.svg)](https://phpackages.com/packages/concur-twig-resource)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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