定制 astroshippers/laravel-minified-blade 二次开发

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

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

astroshippers/laravel-minified-blade

Composer 安装命令:

composer require astroshippers/laravel-minified-blade

包简介

This package provides `.min.blade.php` file extension

README 文档

README

Laravel Minified Blade

This package provides .min.blade.php file extension.

Just add the .min to your .blade.php, and the template will get minified! ⚡

Installation

composer require astroshippers/laravel-minified-blade

Usage

Let's use this file as an example.

<div>
    @if($age > 13)
        <p>
            Welcome to your new account!
        </p>
    @else
        <b>
            Sorry, access denied.
        </b>
    @endif
</div>

Normally, without using this package it will be compiled into this:

<div>
    <?php if($age > 13): ?>
        <p>
            Welcome to your new account!
        </p>
    <?php else: ?>
        <b>
            Sorry, access denied.
        </b>
    <?php endif; ?>
</div>
<?php /**PATH /home/asdf/code/notionmailer/resources/views/test.blade.php ENDPATH**/ ?>

But, if you add this package and use .min in your file extension, you will have the following result:

<div><?php if($age> 13): ?><p> Welcome to your new account! </p><?php else: ?><b> Sorry, access denied. </b><?php endif; ?></div><?php /**PATH /home/asdf/code/notionmailer/resources/views/test.min.blade.php ENDPATH**/ ?>

What is the use case?

Why not just use a directive, such as @minified and @endminified?

Directives get executed after the template is rendered, which may add unwanted behavior such as your dynamic content spacing being minified.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固