dinesh/helper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

dinesh/helper

最新稳定版本:0.4

Composer 安装命令:

composer require dinesh/helper

包简介

README 文档

README

Example to file ajax data

{{ DNS::ajax_fill_dropdown('country_id','state_id',URL::to('ajax/states')) }}
{{ DNS::ajax_fill_dropdown('country_id','state_id',URL::to('ajax/states'),array('statea_id','stateb_id')) }}
{{ DNS::imgBase64("data:image/png", DNS::code128BarCode(123456, 1,'PRODUCT')) }}
{{ DNS::getUniqueFilename() }}



class AjaxController extends BaseController {

    public function postStates($param = array()) {
        $list = array();

        if (Input::get("country_id")) {
            $list = State::where("country_id", "=", Input::get("country_id"))->lists("name", "id");
        } else if (Input::old("country_id")) {
            $list = State::where("country_id", "=", Input::old("country_id"))->lists("name", "id");
        } elseif (isset($param['country_id'])) {
            $list = State::where("country_id", "=", $param['country_id'])->lists("name", "id");
        }
        return $list;
    }
}

use DNS::getQueryLog()  to get query with parameter 


Add Captcha
->with('math_captcha', DNS::create_mathas_captcha());


<div class="control-group {{ $errors->has('captcha') ? 'error' : ''}}">
    <h3 style="padding-left: 25px;">
        <span>
            {{$math_captcha['first_digit']}}
            {{$math_captcha['operand']}}
            {{$math_captcha['second_digit']}}
            = 
        </span>
        {{ Form::text('captcha', null,array('class'=>'span1','style'=>'display: inline-block;margin-top: 11px;'))}}
        (?)
    </h3>
    {{ $errors->first('captcha', '<span class="help-inline">:message</span>') }}
    <!--<p style="padding: 0;margin: 0;color: red;font-size: 13px;font-weight: bolder;">ઉપર ના સરવાળા કે બાદબાકી નું પરિણામ અહિં લખો</p>-->
</div>


Validator::extend('check_captcha', function($attribute, $value, $parameters)
{
    return DNS::check_captcha($value);
});

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-10-10