2017 © Pedro Peláez
 

library helper

image

dinesh/helper

  • Monday, August 31, 2015
  • by Dinesh
  • Repository
  • 1 Watchers
  • 1 Stars
  • 963 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

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

```php, (*1)

->with('math_captcha', DNS::create_mathas_captcha());, (*2)

{{$math_captcha['first_digit']}} {{$math_captcha['operand']}} {{$math_captcha['second_digit']}} = {{ Form::text('captcha', null,array('class'=>'span1','style'=>'display: inline-block;margin-top: 11px;'))}} (?)

{{ $errors->first('captcha', ':message') }}

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

The Versions

31/08 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Dinesh Rabara

31/08 2015

0.4

0.4.0.0

  Sources   Download

MIT

The Requires

 

by Dinesh Rabara

28/07 2015

0.3

0.3.0.0

  Sources   Download

MIT

The Requires

 

by Dinesh Rabara

12/11 2014

0.2

0.2.0.0

  Sources   Download

MIT

The Requires

 

by Dinesh Rabara

01/09 2014

0.1

0.1.0.0

  Sources   Download

The Requires

 

by Dinesh Rabara