PNG IHDR ; IDATxܻn0K )(pA7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5 bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô!x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%tMז -lG6mrz2s%9s@-k9=)kB5\+͂ZsٲRn~GRCwIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL /F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ R IENDB` # Captcha for Laravel 4 A simple [Laravel 4](http://four.laravel.com/) service provider for including the [Captcha for Laravel 4](https://github.com/mewebstudio/captcha). ## Preview  ## Installation The Captcha Service Provider can be installed via [Composer](http://getcomposer.org) by requiring the `mews/captcha` package and setting the `minimum-stability` to `dev` (required for Laravel 4) in your project's `composer.json`. ```json { "require": { "laravel/framework": "4.0.*", "mews/captcha": "dev-master" }, "minimum-stability": "dev" } ``` Update your packages with ```composer update``` or install with ```composer install```. ## Usage To use the Captcha Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this. Find the `providers` key in `app/config/app.php` and register the Captcha Service Provider. ```php 'providers' => array( // ... 'Mews\Captcha\CaptchaServiceProvider', ) ``` Find the `aliases` key in `app/config/app.php`. ```php 'aliases' => array( // ... 'Captcha' => 'Mews\Captcha\Facades\Captcha', ) ``` ## Configuration To use your own settings, publish config. ```$ php artisan config:publish mews/captcha``` ## Example Usage ```php // [your site path]/app/routes.php Route::any('/captcha-test', function() { if (Request::getMethod() == 'POST') { $rules = array('captcha' => array('required', 'captcha')); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { echo '
Incorrect!
'; } else { echo 'Matched :)
'; } } $content = Form::open(array(URL::to(Request::segment(1)))); $content .= '' . HTML::image(Captcha::img(), 'Captcha image') . '
'; $content .= '' . Form::text('captcha') . '
'; $content .= '' . Form::submit('Check') . '
'; $content .= '' . Form::close() . '
'; return $content; }); ``` ^_^ ## Links * [L4 Captcha on Github](https://github.com/mewebstudio/captcha) * [L4 Captcha on Packagist](https://packagist.org/packages/mews/captcha) * [For L3 on Github](https://github.com/mewebstudio/mecaptcha) * [License](http://www.opensource.org/licenses/mit-license.php) * [Laravel website](http://laravel.com) * [Laravel Turkiye website](http://www.laravel.gen.tr) * [MeWebStudio website](http://www.mewebstudio.com)