项目作者: UEGMobile

项目描述 :
Symfony twig extension bundle to use uuid function (based on ramsey/uuid bundle)
高级语言: PHP
项目地址: git://github.com/UEGMobile/uuid-twig-extension-bundle.git
创建时间: 2018-06-15T11:23:05Z
项目社区:https://github.com/UEGMobile/uuid-twig-extension-bundle

开源协议:MIT License

下载


uuid-twig-extension-bundle

Symfony twig extension bundle to use uuid function (based on ramsey/uuid bundle)

installation

Through composer in your symfony project:

  1. composer require uegmobile/uuid-twig-extension-bundle

In Symfony <= 3, Then, register the bundle in your AppKernel by adding the following line:

  1. new UEGMobile\UUIDTwigExtensionBundle\UUIDTwigExtensionBundle()

In Symfony >= 4, Then, register the bundle in your bundle.php file by adding the following line:

  1. UEGMobile\UUIDTwigExtensionBundle\UUIDTwigExtensionBundle::class => ['all' => true]

twig extensions

uuid function:

  • link function to ramsey/uuid

Examples

Print new UUID in a twig template:

  1. {{ uuid() }}