PHPackages                             arrilot/vue-templates-in-php - 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. arrilot/vue-templates-in-php

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

arrilot/vue-templates-in-php
============================

A simple package to manage vue components' templates in php

0.1.3(7y ago)6853MITPHPPHP &gt;=5.6

Since Apr 1Pushed 7y agoCompare

[ Source](https://github.com/arrilot/vue-templates-in-php)[ Packagist](https://packagist.org/packages/arrilot/vue-templates-in-php)[ Docs](https://github.com/arrilot/vue-templates-in-php)[ RSS](/packages/arrilot-vue-templates-in-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/fd2a513bfd5718b1907142267eeee3ed38229e5b45d7af5606cc4b39fa7ffcf1/68747470733a2f2f706f7365722e707567782e6f72672f617272696c6f742f7675652d74656d706c617465732d696e2d7068702f762f737461626c652e737667)](https://packagist.org/packages/arrilot/vue-templates-in-php/)[![Total Downloads](https://camo.githubusercontent.com/ec853e241f422212957b0d8b510e43d82d6afac766c81164d51bd5fc4eec1030/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617272696c6f742f7675652d74656d706c617465732d696e2d7068702e7376673f7374796c653d666c6174)](https://packagist.org/packages/arrilot/vue-templates-in-php)[![Build Status](https://camo.githubusercontent.com/4bcc1a38c06c73a77c8fcdd3b24e4bcc8431ac4e645510a95ce4efbeaefc9e7a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f617272696c6f742f7675652d74656d706c617465732d696e2d7068702f6d61737465722e7376673f7374796c653d666c6174)](https://travis-ci.org/arrilot/vue-templates-in-php)

Vue templates in PHP
====================

[](#vue-templates-in-php)

Introduction
------------

[](#introduction)

There are two main ways to deal with vue components' templates:

1. Single file components
2. ``

Single files components are great, but they have their own problems:

1. You need a decent build setup.
2. You can't manage templates from php directly. If this is not an issue for you - go with them, you don't need this package then. Otherwise this small packages can help you to set up `` scheme in a simple and maintainable way.

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

[](#installation)

1. `composer require arrilot/vue-templates-in-php`

Usage
-----

[](#usage)

First of all create a helper like that

```
function vue()
{
    static $vue = null;

    if ($vue === null) {
        $vue = new \Arrilot\VueTemplates\TemplateManager('/absolute/path/to/directory/where/you/want/to/store/templates/');
    }

    return $vue;
}
```

or place `TemplateManager` object in a Service Container if you have one.

Add

```

```

somewhere in footer *above* a script that starts vue application.

Now you can start making templates. For example let's imagine that you want to create a component for main menu.

1. Create a component without template somewhere in js.
2. Create a `main-menu.php` file inside the directory you passed to `TemplateManager`. This is a component template. You don't need to add any `` or `` tags to it. It's done behind the scenes.
3. Register this template on pages where you need it - `vue()->addTemplate('main-menu')`.
4. Now you can reference it in a vue component you have created in step 1 like that: `template: '#vue-main-menu-template'`

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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.

###  Release Activity

Cadence

Every ~64 days

Total

4

Last Release

2768d ago

PHP version history (2 changes)0.1.0PHP &gt;=7.1

0.1.3PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/58d505cd6b2551974b0c076d133fd9a3c9cd635bbf308adb17a6399bd3b63232?d=identicon)[Arrilot](/maintainers/Arrilot)

---

Top Contributors

[![arrilot](https://avatars.githubusercontent.com/u/2826480?v=4)](https://github.com/arrilot "arrilot (11 commits)")

---

Tags

vue

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arrilot-vue-templates-in-php/health.svg)

```
[![Health](https://phpackages.com/badges/arrilot-vue-templates-in-php/health.svg)](https://phpackages.com/packages/arrilot-vue-templates-in-php)
```

###  Alternatives

[wbrowar/guide

A CMS Guide for Craft CMS.

6154.5k1](/packages/wbrowar-guide)[vikdiesel/admin-one-laravel-dashboard

Admin One - Laravel Dashboard Preset (SPA)

1435.5k](/packages/vikdiesel-admin-one-laravel-dashboard)

PHPackages © 2026

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