witooh / permission
There is no license information available for the latest version (dev-master) of this package.
dev-master
2013-05-10 15:46 UTC
Requires
- php: >=5.3.0
- illuminate/support: 4.0.x
This package is not auto-updated.
Last update: 2025-01-13 11:46:29 UTC
README
Usage/h2> Add Service Provider ```php 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;
});
}
}