PHPackages                             comnect/smarty - 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. comnect/smarty

Abandoned → [ytake/laravel-smarty](/?search=ytake%2Flaravel-smarty)Library[Templating &amp; Views](/categories/templating)

comnect/smarty
==============

smarty template engine for laravel4

2.0.1(11y ago)0400MITPHPPHP &gt;=5.4.0

Since Sep 18Pushed 11y ago1 watchersCompare

[ Source](https://github.com/ytake/laravel-smarty)[ Packagist](https://packagist.org/packages/comnect/smarty)[ RSS](/packages/comnect-smarty/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (8)Versions (7)Used By (0)

smarty template engine for laravel4
===================================

[](#smarty-template-engine-for-laravel4)

\#This Project Has Been Deprecated new Laravel.Smarty Project -&gt; [Laravel.Smarty](https://github.com/ytake/Laravel.Smarty)
-----------------------------------------------------------------------------------------------------------------------------

[](#this-project-has-been-deprecatednew-laravelsmarty-project---laravelsmarty)

[![Build Status](https://camo.githubusercontent.com/5349f7c55fcf7d3d9b6bf91a155c3651ed40e7a264792c75331051f93917b1c5/68747470733a2f2f7472617669732d63692e6f72672f7974616b652f6c61726176656c2d736d617274792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ytake/laravel-smarty)[![Latest Stable Version](https://camo.githubusercontent.com/67da756430fc3362e00018cb098fa814df14ef8160ea7b1f553dc830746fe2cb/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6e6563742f736d617274792f762f737461626c652e706e67)](https://packagist.org/packages/comnect/smarty) [![Total Downloads](https://camo.githubusercontent.com/f8068e8a4851b1f9de7dc9e7240a68b4b807fe332beac7b0bae720a89c9b0dde/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6e6563742f736d617274792f646f776e6c6f6164732e706e67)](https://packagist.org/packages/comnect/smarty) [![HHVM Status](https://camo.githubusercontent.com/a6be09558b5a59e441e6fe7cb2e4a63187e87f34e2055f489b62adce888d1214/687474703a2f2f6868766d2e683463632e64652f62616467652f636f6d6e6563742f736d617274792e706e67)](http://hhvm.h4cc.de/package/comnect/smarty) [![License](https://camo.githubusercontent.com/e48c6c10fccc4c0cb13581e902cf2c9a9acdd121e818e6c8ef98a55e9d3aa039/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6e6563742f736d617274792f6c6963656e73652e706e67)](https://packagist.org/packages/comnect/smarty)\##install 導入方法 ###for Laravel4.2

```
    "require": {
        "comnect/smarty": "2.*"
    },
```

\###for Laravel4.1

```
    "require": {
        "comnect/smarty": "1.*"
    },
```

\##Basic smarty template for laravel4

laravel4でsmartyを使用できます。
bladeの構文をそのまま使用することができ、
それに加え、View Facadeを通じてsmartyのmethodはすべて利用可能です。
easily use all the methods of smarty
\###required array short syntax!

```
// laravel4 blade template render
View::make('template', ['hello']);
// use smarty method
View::assign('word', 'hello');
View::clearAllAssign(); // smarty method
```

\##Artisan キャッシュクリア、コンパイルファイルの削除がコマンドラインから行えます。
smarty's cacheclear, remove compile class from Artisan(cli) ###cache clear

```
$ php artisan comnect:smarty-cacheclear
```

Options:
\--file (-f) specify file
\--time (-t) clear all of the files that are specified duration time
\###remove compile class

```
$ php artisan comnect:smarty-clear-compiled
```

Options:
\--file (-f) specify file

usage 使い方
=========

[](#usage-使い方)

install後、 app/config配下のapp.phpのproviders配列に以下のnamespaceを追加してください。
add providers

```
'Comnect\Smarty\SmartyServiceProvider'
```

configファイルをpublishします。
publish configure

```
$ php artisan config:publish comnect/smarty
```

app/config/packages配下に追加されます。
publish to app/config/packages

views配下にsmartyファイルがあればそれをテンプレートと使用し、
なければ通常通りbladeテンプレートかphpファイルを使用します。

smartyテンプレート内にも\*{{app\_path()}}\*等のヘルパーそのまま使用できます。
その場合、delimiterをbladeと同じものを指定しない様にしてください。

configファイルでこれらの指定が可能です。

sample
======

[](#sample)

[layout.sample](https://gist.github.com/ytake/11345539)
[layout.extends.sample](https://gist.github.com/ytake/11345614)

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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 ~5 days

Total

6

Last Release

4178d ago

Major Versions

1.0.1 → 4.1.x-dev2014-10-13

2.0.1 → 4.2.x-dev2014-10-13

PHP version history (2 changes)2.0.0PHP &gt;=5.4.0

1.0.0PHP &gt;=5.3.7

### Community

Maintainers

![](https://www.gravatar.com/avatar/47817f3dd2890864096bd77ee772ec46061432f128988ca23939b0ca486d7bc3?d=identicon)[ytake](/maintainers/ytake)

---

Top Contributors

[![ytake](https://avatars.githubusercontent.com/u/4454078?v=4)](https://github.com/ytake "ytake (41 commits)")

---

Tags

laraveltemplatesmarty

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/comnect-smarty/health.svg)

```
[![Health](https://phpackages.com/badges/comnect-smarty/health.svg)](https://phpackages.com/packages/comnect-smarty)
```

###  Alternatives

[ytake/laravel-smarty

Smarty template engine for Laravel and Lumen

85398.5k](/packages/ytake-laravel-smarty)[jenssegers/blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

8661.2M95](/packages/jenssegers-blade)[brackets/admin-ui

Administration user interface template

29256.8k2](/packages/brackets-admin-ui)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

208.9k](/packages/leitsch-kirby-blade)[latrell/smarty

This package lets you run Smarty3 on Laravel5 elegantly.

137.0k](/packages/latrell-smarty)

PHPackages © 2026

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