{"id":19074410,"url":"https://github.com/latrell/captcha","last_synced_at":"2025-04-29T08:55:33.273Z","repository":{"id":16352337,"uuid":"19102313","full_name":"latrell/Captcha","owner":"latrell","description":"Captcha Package for Laravel","archived":false,"fork":false,"pushed_at":"2018-03-16T05:46:50.000Z","size":21,"stargazers_count":8,"open_issues_count":0,"forks_count":13,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-29T08:55:28.136Z","etag":null,"topics":["laravel"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"makemoji/MakemojiSDK-JS","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/latrell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-24T09:05:02.000Z","updated_at":"2020-02-19T23:38:24.000Z","dependencies_parsed_at":"2022-09-10T16:32:41.562Z","dependency_job_id":null,"html_url":"https://github.com/latrell/Captcha","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latrell%2FCaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latrell%2FCaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latrell%2FCaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/latrell%2FCaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/latrell","download_url":"https://codeload.github.com/latrell/Captcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251470282,"owners_count":21594524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel"],"created_at":"2024-11-09T01:50:52.771Z","updated_at":"2025-04-29T08:55:33.255Z","avatar_url":"https://github.com/latrell.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"For Laravel 4, please use the [1.1 branch](https://github.com/Latrell/Captcha/releases/tag/1.1)!\n\n# Captcha for Laravel 5\n\nA simple [Laravel 5](http://laravel.com/) service provider for including the [Captcha for Laravel 5](https://github.com/Gregwar/Captcha).\n\nThis library is not maintained for 3rd party use.\n\n## Preview\n\n![Captchas examples](https://camo.githubusercontent.com/d2ec7ccc16dacc36732ff2c6bad51df1bad2428b/687474703a2f2f677265677761722e636f6d2f63617074636861732e706e67)\n\n## Installation\n\n```\ncomposer require latrell/captcha dev-master\n```\n\n## Usage\n\nTo use the Captcha Service Provider, you must register the provider when bootstrapping your Laravel application. There are\nessentially two ways to do this (only for Laravel 5.4 or below).\n\nFind the `providers` key in `config/app.php` and register the Captcha Service Provider.\n\n```php\n    'providers' =\u003e [\n        // ...\n        'Latrell\\Captcha\\CaptchaServiceProvider',\n    ]\n```\n\nFind the `aliases` key in `config/app.php`.\n\n```php\n    'aliases' =\u003e [\n        // ...\n        'Captcha' =\u003e 'Latrell\\Captcha\\Facades\\Captcha',\n    ]\n```\n\nCustom error messages.\nAdd key `captcha` to `resources/lang/[local]/validation.php`\n\n```php\nreturn [\n\t// ...\n\t'captcha' =\u003e '图片验证码不正确。',\n];\n```\n\nThen publish the config file with `php artisan vendor:publish`. This will add the file `config/latrell-captcha.php`.\nThis config file is the primary way you interact with Captcha.\n\n## Example Usage\n\n```php\n\n    // [your site path]/app/Http/routes.php\n\n    Route::any('/captcha-test', function()\n    {\n\n        if (Request::getMethod() == 'POST')\n        {\n            $rules =  ['captcha' =\u003e 'required|captcha'];\n            $validator = Validator::make(Input::all(), $rules);\n            if ($validator-\u003efails())\n            {\n                echo '\u003cp style=\"color: #ff0000;\"\u003eIncorrect!\u003c/p\u003e';\n            }\n            else\n            {\n                echo '\u003cp style=\"color: #00ff30;\"\u003eMatched :)\u003c/p\u003e';\n            }\n        }\n\n        $content = Form::open(array(URL::to(Request::segment(1))));\n        $content .= '\u003cp\u003e' . HTML::image(Captcha::url()) . '\u003c/p\u003e';\n        $content .= '\u003cp\u003e' . Form::text('captcha') . '\u003c/p\u003e';\n        $content .= '\u003cp\u003e' . Form::submit('Check') . '\u003c/p\u003e';\n        $content .= '\u003cp\u003e' . Form::close() . '\u003c/p\u003e';\n        return $content;\n\n    });\n```\n\n## Links\n\n* [L5 Captcha on Github](https://github.com/latrell/captcha)\n* [L5 Captcha on Packagist](https://packagist.org/packages/Latrell/captcha)\n* [Captcha for Gregwar](https://github.com/Gregwar/Captcha)\n* [License](http://www.opensource.org/licenses/mit-license.php)\n* [Laravel website](http://laravel.com)\n* [MeWebStudio website](http://latrell.me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatrell%2Fcaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flatrell%2Fcaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flatrell%2Fcaptcha/lists"}