{"id":31788913,"url":"https://github.com/zerosdev/laravel-captcha","last_synced_at":"2025-10-10T14:29:39.371Z","repository":{"id":57090212,"uuid":"226924749","full_name":"zerosdev/laravel-captcha","owner":"zerosdev","description":"Laravel Captcha Generator","archived":false,"fork":false,"pushed_at":"2020-01-25T10:18:31.000Z","size":248,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T13:28:40.238Z","etag":null,"topics":["captcha","laravel","php","php-captcha-generator"],"latest_commit_sha":null,"homepage":"https://www.zeros.co.id","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zerosdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-09T17:07:42.000Z","updated_at":"2025-09-06T08:43:12.000Z","dependencies_parsed_at":"2022-08-20T16:00:57.681Z","dependency_job_id":null,"html_url":"https://github.com/zerosdev/laravel-captcha","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zerosdev/laravel-captcha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Flaravel-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Flaravel-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Flaravel-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Flaravel-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerosdev","download_url":"https://codeload.github.com/zerosdev/laravel-captcha/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerosdev%2Flaravel-captcha/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004178,"owners_count":26083688,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["captcha","laravel","php","php-captcha-generator"],"created_at":"2025-10-10T14:29:05.118Z","updated_at":"2025-10-10T14:29:39.364Z","avatar_url":"https://github.com/zerosdev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Captcha\nLaravel Captcha Generator\n\n## Requirements\n- PHP 5.6+\n- Laravel Framework 5.2+\n- GD Library enabled\n\n## Installation\n- Run\n\u003cpre\u003e\u003ccode\u003ecomposer require zerosdev/laravel-captcha:dev-master\u003c/code\u003e\u003c/pre\u003e\n\n- Add this code to your **config/app.php** in providers array\n\u003cpre\u003e\u003ccode\u003eZerosDev\\LaravelCaptcha\\ServiceProvider::class,\u003c/code\u003e\u003c/pre\u003e\n\n- Add this code to your **config/app.php** in aliases array\n\u003cpre\u003e\u003ccode\u003e'Captcha' =\u003e ZerosDev\\LaravelCaptcha\\Facade::class,\u003c/code\u003e\u003c/pre\u003e\n\n- Run\n\u003cpre\u003e\u003ccode\u003ecomposer dump-autoload\u003c/code\u003e\u003c/pre\u003e\n\n- Run\n\u003cpre\u003e\u003ccode\u003ephp artisan vendor:publish --provider=\"ZerosDev\\LaravelCaptcha\\ServiceProvider\"\u003c/code\u003e\u003c/pre\u003e\n\n## Configuration\nOpen your **config/captcha.php** and adjust the setting. Optionally, you can adjust some captcha setting on-the-fly with available methods below:\n\n#### chars(String)\nSet the characters that will be used as captcha text\n\n#### size(Integer width, Integer height)\nSet the captcha image width and height in pixel (px)\n\n#### length(Integer)\nSet the captcha character length\n\n## Generation Example\n\u003cpre\u003e\u003ccode\u003e\n// Import from root class (Captcha Facade)\nuse Captcha;\n\n// generate captcha\n$captcha = Captcha::chars('123456789ABCDEFGHIJKLMNPQRSTUVWXYZ')-\u003elength(4)-\u003esize(120, 40)-\u003egenerate();\n\n// get captcha id\n$id = $captcha-\u003eid();\n// return random generation id\n\n// print html hidden form field, used in blade template\n{{ $captcha-\u003eform_field() }}\n// return: \u0026lt;input type=\"hidden\" name=\"captcha_id\" value=\"XXXXXXXXXXXXXX\" id=\"captcha_id\"\u0026gt;\n\n// get base64 image\n$image = $captcha-\u003eimage();\n// return data:image/png; base64,XXXXXXXXXXXXXX\n\n// print html image, used in blade template\n{{ $captcha-\u003ehtml_image(['onclick' =\u003e 'jsFunction()', 'style' =\u003e 'border:1px solid #ddd']) }}\n// return: \u0026lt;img src=\"data:image/png; base64,XXXXXXXXXXXXXX\" onclick=\"jsFunction()\" style=\"border:1px solid #ddd\" /\u0026gt;\n\u003c/code\u003e\u003c/pre\u003e\n\n## Validation\n\u003cpre\u003e\u003ccode\u003e\n// Import from root class (Captcha Facade)\nuse Captcha;\n\n// validate captcha\n// $captchaId = Captcha generation id, $captcha-\u003eid()\n// $captchaText = Captcha input from client request\n\nif( Captcha::validate($captchaId, $captchaText) )\n{\n    // Valid\n}\nelse\n{\n    // Invalid\n}\n\u003c/code\u003e\u003c/pre\u003e\n\n## Advise\nIt is recommended to avoid using the \"0\" (zero) and \"O\" characters in captcha to avoid being ambiguous\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerosdev%2Flaravel-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerosdev%2Flaravel-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerosdev%2Flaravel-captcha/lists"}