Giter Site home page Giter Site logo

helper's Introduction

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);
});

helper's People

Contributors

dineshrabara avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

savanihd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.