Package Data | |
---|---|
Maintainer Username: | wikichua |
Maintainer Contact: | wikichua@gmail.com (Wiki Chua) |
Package Create Date: | 2013-06-17 |
Package Last Update: | 2013-06-19 |
Language: | PHP |
License: | GPL-2.0 |
Last Refreshed: | 2024-11-24 03:02:57 |
Package Statistics | |
---|---|
Total Downloads: | 77 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Composer.json:
require: "wikichua/captcha": "dev-master"
Provider:
'Wikichua\Captcha\CaptchaServiceProvider',
Alias:
'Captcha' => 'Wikichua\Captcha\Facades\Captcha',
Sample usage:
Route::any('test',function() { if (Request::getMethod() == 'POST') { $rules = array('thecaptcha' => array('required', 'captcha')); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { echo 'Captcha failed'; } else { echo 'Captcha passed'; } }
$content = Form::open(['to'=>URL::to(Request::segment(1))]);
$content .= '<p>' . Captcha::imgUrl(['class'=>'testing']) . '</p>';
$content .= '<p>' . Form::text('thecaptcha') . '</p>';
$content .= '<p>' . Form::submit('Check') . '</p>';
$content .= Form::close();
return $content;
});