承接 lionmm/compile-blades 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

lionmm/compile-blades

最新稳定版本:1.0.1-rc1

Composer 安装命令:

composer require lionmm/compile-blades

包简介

Fork of te-cho/compile-blades to compile blades into a new file instead of overwriting the old file.

README 文档

README

A Laravel package for compiling blades nested in 1 file into 1 flattened file.

Refactored and tested only for Laravel 8

Be ready to refactor your views for using this command ;)

Why?

For best performance, you may want to consider flattening your blades on production, cause a lot of nesting consumes time in laravel since each nested level repeats the same pipline process, that consumes time & memory.

Example of problems:

Table of Contents

Requirements

This version of package working only with Laravel 8+

Installation

1) Require the package

From your project's base path, run:

    $ composer require lionmm/compile-blades

2) Configure Laravel

    $ ./artisan vendor:publish --provider="Lionmm\CompileBlades\CompileBladesServiceProvider"

WIP

Usage

Before getting started, I highly recommend reading through Laravels documentation on Views and Blades.

Flattening Views:

Providing everything is set up and configured properly, all you need to do in order to flatten a view for a certain route or something else, is running the following command:

    $ php artisan view:compile view.name

This will generate a flattened view instead of the current one.

Better way: pic needed blades in auto_compilers section of configuration and use command

    $ php artisan view:compile:auto

By default, folder compiled will be created in your resources/views path and flatten files will be placed in it

Now you can use command compiled_view(); instead of view(); for using flatten views IF they present

WIP

统计信息

  • 总下载量: 171
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 23
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固