定制 vesperabr/laravel-data-binder 二次开发

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

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

vesperabr/laravel-data-binder

Composer 安装命令:

composer require vesperabr/laravel-data-binder

包简介

Bind and retrieve input data

README 文档

README

The vesperabr/laravel-data-binder package provides an easy whay to bind and retrieve input data.

Installation

You can install the package via composer:

$ composer require vesperabr/laravel-data-binder

The package will automatically register itself.

Binding values

You can append values to the binding tree by two ways:

Using bind() method

use Vespera\DataBinder\Support\Facades\DataBinder;
DataBinder::bind(['foo' => 'bar'])

Using blade directives

@bind(['foo' => 'bar'])
    ...
@endbind

Pop data from binding

To remove the last data from binding tree just call pop() method.

use Vespera\DataBinder\Support\FacadesDataBinder;
DataBinder::pop();

Retrieving values from binding

To retrieve a value from binding tree use the DataValue facade.

use Vespera\DataBinder\Support\Facades\DataValue;
DataValue::get('foo');

You can also override the current bind data passing a second parameter.

$user = User::find(1);
DataValue::get('name', $user);

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固