Package

Ytake Laravel Smarty

Smarty template engine for Laravel and Lumen

Package

ytake/laravel-smarty

View on GitHub →

smarty template engine for laravel4

#This Project Has Been Deprecated new Laravel.Smarty Project -> Laravel.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 使い方

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

layout.sample
layout.extends.sample

Ytake Laravel Smarty Related Articles

Command Line Search Tools for Programmers image

Command Line Search Tools for Programmers

Read article
2019 in Review image

2019 in Review

Read article
80 Laravel Tutorials, Packages, and Resources from 2016 image

80 Laravel Tutorials, Packages, and Resources from 2016

Read article
90 Laravel Tutorials, Packages, and Resources from 2023 image

90 Laravel Tutorials, Packages, and Resources from 2023

Read article
Laravel News 2025 Recap image

Laravel News 2025 Recap

Read article
Laravel News 2024 Recap image

Laravel News 2024 Recap

Read article

Let your users buy domains without leaving your app

If your Laravel app gives users a site, a storefront, or a workspace, they’ll eventually want their own domain. The name.com API lets them search, register, and connect one without leaving your product. It’s a clean REST API, so Laravel’s HTTP client is all you need.

Let your users buy domains without leaving your app

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift