定制 corviz/crow 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

corviz/crow

Composer 安装命令:

composer require corviz/crow

包简介

Php template engine

README 文档

README

Yet another php template engine

Features:

  • Easily extensible - You can create new methods to satisfy your needs
  • Wide spread syntax (similar to Blade)
  • Framework agnostic - You can use it in any project
  • Easy to configure - It takes literally 2 commands to make a basic configuration (1 if you won't use components/custom tags)
  • MIT license. Free for commercial and non-commercial use

Installation with composer

composer require corviz/crow

Quickstart

In your main script:

use Corviz\Crow\Crow;

Crow::setDefaultPath('/path/to/templates/folder');
Crow::setComponentsNamespace('MyComponents'); //Required only if you will use components/custom tags

Crow::render('index');

In /path/to/templates/folder/index.crow.php:

<!DOCTYPE html>
<html>
    <head>
        <title>Index</title>
    </head>
    <body>
        {{ 'Hello world' }}
    </body>
</html>

Basic loop example

In your main script:

$todoList = ['Work', 'Clean house', 'Relax'];

Crow::render('template', ['todoList' => $todoList]);

Template file

<h1>Todo:</h1>
<ul>
    @foreach($todoList as $task)
        <li>{{ $task }}</li>
    @endforeach
</ul>

Credits

Like it?

Visit https://corviz.github.io/crow/ for documentation/examples

统计信息

  • 总下载量: 52
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固