{"id":19936631,"url":"https://github.com/archytech99/simple-captcha","last_synced_at":"2025-03-01T12:22:50.482Z","repository":{"id":261565606,"uuid":"336887141","full_name":"archytech99/simple-captcha","owner":"archytech99","description":"A simple Captcha for laravel 6/7","archived":false,"fork":false,"pushed_at":"2024-11-07T07:54:06.000Z","size":459,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-12T02:56:35.040Z","etag":null,"topics":["captcha","laravel-captcha","laravel-package","laravel-security","laravel6-captcha","laravel7-captcha"],"latest_commit_sha":null,"homepage":"","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/archytech99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-07T20:52:23.000Z","updated_at":"2024-11-07T07:54:10.000Z","dependencies_parsed_at":"2024-11-07T08:49:44.067Z","dependency_job_id":null,"html_url":"https://github.com/archytech99/simple-captcha","commit_stats":null,"previous_names":["archytech99/simple-captcha"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archytech99%2Fsimple-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archytech99%2Fsimple-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archytech99%2Fsimple-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archytech99%2Fsimple-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archytech99","download_url":"https://codeload.github.com/archytech99/simple-captcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241362873,"owners_count":19950640,"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":["captcha","laravel-captcha","laravel-package","laravel-security","laravel6-captcha","laravel7-captcha"],"created_at":"2024-11-12T23:27:38.714Z","updated_at":"2025-03-01T12:22:50.440Z","avatar_url":"https://github.com/archytech99.png","language":"PHP","readme":"# A simple PHP CAPTCHA script\n\nThis code is the object oriented version of the original code [simple-captcha](https://github.com/yasirmturk/simple-php-captcha/). Minor improvements (dynamic path for fonts and background images).\n\n## Requirements\n\n- PHP `^7.2`\n- Laravel Framework: `^6.0|^7.0`\n- GD library,\n- illuminate/config: `^6|^7`,\n- illuminate/filesystem: `^6|^7`,\n- illuminate/support: `^6|^7`,\n- illuminate/hashing: `^6|^7`,\n- illuminate/session: `^6|^7`,\n- intervention/image: `~2.5`\n\n## Installation\n\nRequire this package in the `composer.json` of your laravel project. This will download the requirements package:\n\n```bash\ncomposer require archytech/simple-captcha\n```\n\nOnce Composer has installed or updated, you need to register Captcha. Open up `config/app.php` and:\n\n- find the `providers` key and register the `SimpleCapthaServiceProvider`\n\n    ```php\n    'providers' =\u003e [\n        /*\n        * Package Service Providers ...\n        */\n        Archytech\\Captcha\\SimpleCapthaServiceProvider::class,\n    ]\n    ```\n\n- find the `aliases` key and add `Archytech\\Captcha\\Facades\\Facade` as `Captcha`\n\n    ```php\n    'aliases' =\u003e [\n        ...\n        'Captcha' =\u003e Archytech\\Captcha\\Facades\\Facade::class,\n    ]\n    ```\n\nFinally you need to publish a configuration file by running the following artisan command.\n\n```bash\nphp artisan vendor:publish --provider=\"Archytech\\Captcha\\SimpleCapthaServiceProvider\"\n```\n\nThis will copy the configuration file to `config/captcha.php`\n\n## Validation\n\n- via controller\n\n    ```php\n    $validator = validator()-\u003emake(request()-\u003eall(), [\n        'captcha' =\u003e 'required|captcha'\n    ]);\n\n    if ($validator-\u003efails()) {\n        // TODO if failed\n    } else {\n        // TODO if matched\n    }\n    ```\n\n- via api\n\n    ```php\n    $validator = validator()-\u003emake(request()-\u003eall(), [\n        'captcha' =\u003e 'required|captcha_api:' . request('key')\n    ]);\n\n    if ($validator-\u003efails()) {\n        return response()-\u003ejson([\n            'message' =\u003e 'Invalid captcha',\n        ]);\n    } else {\n        // TODO if matched\n    }\n    ```\n\n## Testing\n\n- Once installation \u0026 configuration complete, you can access via `php artisan serve` and open url `http://localhost:8000/captcha/test`\n\n## Get Image\n\n- `captcha();`\n- `Captcha::init();`\n\n## Get Source Url\n\n- `captcha_image_src();`\n- `Captcha::src();`\n\n## Get Html Tag `\u003cimg\u003e`\n\n- `captcha_image_html();`\n- `Captcha::html();`\n\n## License\n\nLicensed under the [MIT](LICENSE.md) license\n\n## Credits\n\n- Thanks to Cory LaViska for the base code and Yasir M Türk for the: \u003chttps://github.com/yasirmturk/simple-php-captcha\u003e\n- Special thanks to Subtle Patterns for the patterns used for default backgrounds: \u003chttp://subtlepatterns.com\u003e\n- Special thanks to dafont.com for providing Times New Yorker: \u003chttp://www.dafont.com\u003e\n- Special thanks to Fonthead Design for providing GoodDog: \u003chttp://www.fonthead.com\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchytech99%2Fsimple-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchytech99%2Fsimple-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchytech99%2Fsimple-captcha/lists"}