2017 © Pedro Peláez
 

library permission

image

witooh/permission

  • Friday, May 10, 2013
  • by witooh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Validator Interface

<, (*1)

h2>Usage/h2> Add Service Provider, (*2)

namespace Domains\Validators;

use Witooh\Validators\IValidator;

class LoginValidator extends IValidator {

    protected $rule = array(
        'username'=>'required',
        'password' => 'required|username_password_exist'
    );

    protected function registerCustomValidators(){
        Validator::extend('username_password_exist', function($attribute, $value, $parameters)
        {
            $credentials = array(
                'username'=>Input::get('username'),
                'password'=>Input::get('password'),
            );

            return Auth::validate($credentials) ? true : false;
        });
    }
}

The Versions

10/05 2013

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Avatar witooh