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

Laravel Smarty

ytake/laravel-smarty image

Laravel Smarty stats

Downloads
239.7K
Stars
0
Open Issues
0
Forks
0

View on GitHub →

Smarty template engine for Laravel and Lumen

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 photo

Web | ML | Streaming Data Application Developer

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Ytake Laravel Smarty Related Articles

Laravel Announces Official AI SDK for Building AI-Powered Apps image

Laravel Announces Official AI SDK for Building AI-Powered Apps

Read article
HydePHP v2 image

HydePHP v2

Read article
Supercharge Your Laravel Projects: Real AI Coding with Laravel Boost! image

Supercharge Your Laravel Projects: Real AI Coding with Laravel Boost!

Read article
Build a Smart AI Task Manager with Laravel, Livewire & PrismPHP image

Build a Smart AI Task Manager with Laravel, Livewire & PrismPHP

Read article
Using Language Servers in Sublime Text image

Using Language Servers in Sublime Text

Read article
Lint and Fix Your Laravel Code with Duster image

Lint and Fix Your Laravel Code with Duster

Read article
Statamic logo

Statamic

The drop-in ready Laravel CMS you’re been waiting for. Go full-stack or headless, flat file or database – it’s up to you.

Statamic
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Blastup logo

Blastup

Blastup provides social media enhancement services including buying Instagram likes, followers, and views, with features like instant delivery and a variety of packages to suit different needs.

Blastup
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit