Download the PHP package isszz/think-blade without Composer

On this page you can find all versions of the php package isszz/think-blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package think-blade

blade

thinkphp8 blade view engine

Minimum PHP Version Minimum Thinkphp Version Stable Version Total Downloads License

安装

配置

容器注入

容器中的类解析调用,对于已经绑定的类标识,会自动快速实例化

扩展 Blade

Blade 允许你使用 directive 方法自定义指令。当 Blade 编译器遇到自定义指令时,这会调用该指令包含的表达式提供的回调。

用法, 当然你也可以传递参数

自定义 If 语句

在定义简单的、自定义条件语句时,编写自定义指令比必须的步骤复杂。在这种情况下,think Blade 提供了 View::if 方法,它允许你使用闭包快速度定义条件指令。例如,定义一个校验当前应用的自定义指令

一旦定义了自定义条件指令,就可以在模板中轻松的使用:

需要使用到 auth 和 权限验证时, 需要自行实现一个 auth 挂载进 app 且实现下列方法

中间件 挂载 auth 到 app 案例

有条件地编译 class 样式

@class指令有条件地编译 CSS class 样式。该指令接收一个数组,其中数组的键包含你希望添加的一个或多个样式的类名,而值是一个布尔表达式。如果数组元素有一个数值的键,它将始终包含在呈现的 class 列表中:

同样,@style 指令可用于有条件地将内联 CSS 样式添加到一个 HTML 元素中。

附加属性

为方便起见,你可以使用该@checked指令轻松判断给定的 HTML 复选框输入是否被「选中(checked)」。如果提供的条件判断为true,则此指令将回显checked

@selected指令可用于判断给定的选项是否被「选中(selected)」:

@disabled指令可用于判断给定元素是否为「禁用(disabled)」:

@readonly指令可以用来指示某个元素是否应该是「只读 (readonly)」的。

@required指令可以用来指示一个给定的元素是否应该是「必需的(required)」。

表单csrf token

Method 字段

由于 HTML 表单不能发出 PUTPATCHDELETE 请求,因此需要添加一个隐藏的 __method__ 字段来欺骗这些 HTTP 动词。 @method Blade 指令可以为你创建此字段:

自定义button组件

自定义button组件

更多用法参考 laravel blade 手册

https://learnku.com/docs/laravel/10.x/blade/14852


All versions of think-blade with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
ext-fileinfo Version *
ext-mbstring Version *
topthink/framework Version 8.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package isszz/think-blade contains the following files

Loading the files please wait ....