{"id":36398957,"url":"https://github.com/viktor-miller/laravel-confirmation","last_synced_at":"2026-01-11T16:01:42.973Z","repository":{"id":57077994,"uuid":"116144694","full_name":"viktor-miller/laravel-confirmation","owner":"viktor-miller","description":"Laravel email confirmation package","archived":false,"fork":false,"pushed_at":"2018-03-14T21:05:57.000Z","size":112,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-17T03:55:43.383Z","etag":null,"topics":["confirmation","email","laravel"],"latest_commit_sha":null,"homepage":null,"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/viktor-miller.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":"2018-01-03T14:15:34.000Z","updated_at":"2018-03-14T21:05:58.000Z","dependencies_parsed_at":"2022-08-24T14:56:11.604Z","dependency_job_id":null,"html_url":"https://github.com/viktor-miller/laravel-confirmation","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/viktor-miller/laravel-confirmation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-miller%2Flaravel-confirmation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-miller%2Flaravel-confirmation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-miller%2Flaravel-confirmation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-miller%2Flaravel-confirmation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viktor-miller","download_url":"https://codeload.github.com/viktor-miller/laravel-confirmation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-miller%2Flaravel-confirmation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28312133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["confirmation","email","laravel"],"created_at":"2026-01-11T16:01:17.242Z","updated_at":"2026-01-11T16:01:42.954Z","avatar_url":"https://github.com/viktor-miller.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Email Confirmation # \n\nThis package is intended to confirm the email address of the user. **Tested and used with Laravel 5.4 and 5.5**\n\n## Features ##\n- Migration to add \"confirmed\" column to users table\n- Migration to create \"email_confirmations\" table\n- Scaffold for view, controller, routes and notification\n- Publish translations and configs\n- The validation rule for unconfirmed users. The validation rule supports an additional property for setting a pause in hours. For example: after registration, the user is allowed to log in for (n) hours without confirming the email address.\n- HTML form for resending a notification with instructions for confirming an email address\n- HTML form for confirmation of email address in manual mode (Enter e-mail and token).\n- Support for confirmation of the email address in the automatic mode (click on the link that was received by e-mail)\n\n\n## Installation ##\n\n1. Add package to your **composer.json** file:\n\n        composer require viktor-miller/laravel-confirmation\n\t\n2. For Laravel 5.4 add service provider and aliase to **config/app.php**\n\n```php\n'providers' =\u003e [\n    ViktorMiller\\LaravelConfirmation\\ServiceProvider::class,\n],\n'aliases' =\u003e [\n    'Confirmation' =\u003e ViktorMiller\\LaravelConfirmation\\Facades\\Confirmation::class\n]\n```\n\n3. Add a **Confirmable** trait and implement **Confirmable** interface on your User model\n\n```php\n\u003c?php\n\nnamespace App\\User;\n\nuse Illuminate\\Notifications\\Notifiable;\nuse ViktorMiller\\LaravelConfirmation\\Confirmable;\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\nuse ViktorMiller\\LaravelConfirmation\\Contracts\\Confirmable as ConfirmableContract;\n\nclass User extends Authenticatable implements Confirmable\n{\n    use Notifiable, Confirmable;\n```\n\n4. Add validation rule in LoginController and ForgotPasswordController to restrict users with an unconfirmed email address.\n\n    For Laravel \u003e= 5.4:\n\n    LoginController\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nclass LoginController extends Controller\n{\n    /**\n     * Validate the user login request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return void\n     */\n    protected function validateLogin(Request $request)\n    {\n        $this-\u003evalidate($request, [\n            $this-\u003eusername() =\u003e 'required|string|verified',\n            'password' =\u003e 'required|string',\n        ]);\n    }\n```\n\nand ForgotPasswordController\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nclass ForgotPasswordController extends Controller\n{ \n    /**\n     * Validate the email for the given request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return void\n     */\n    protected function validateEmail(Request $request)\n    {\n        $this-\u003evalidate($request, ['email' =\u003e 'required|email|verified']);\n    }\n```\n\t    \nFor Laravel 5.5:\n\t\nLoginController\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse ViktorMiller\\LaravelConfirmation\\Rules\\Verified;\n\nclass LoginController extends Controller\n{\n    /**\n     * Validate the user login request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return void\n     */\n    protected function validateLogin(Request $request)\n    {\n        $this-\u003evalidate($request, [\n            $this-\u003eusername() =\u003e ['required', 'string', new Verified],\n            'password' =\u003e 'required|string',\n        ]);\n    }\n```\n\t    \nand ForgotPasswordController\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse ViktorMiller\\LaravelConfirmation\\Rules\\Verified;\n\nclass ForgotPasswordController extends Controller\n{ \n    /**\n     * Validate the email for the given request.\n     *\n     * @param  \\Illuminate\\Http\\Request  $request\n     * @return void\n     */\n    protected function validateEmail(Request $request)\n    {\n        $this-\u003evalidate($request, [\n            'email' =\u003e ['required', 'email', new Verified]\n        ]);\n    }\n```\n\n5. Add event listener to **Illuminate\\Auth\\Events\\Registered**\n\n```php\n\u003c?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\Facades\\Event;\nuse Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider as ServiceProvider;\n\nclass EventServiceProvider extends ServiceProvider\n{\n    /**\n     * The event listener mappings for the application.\n     *\n     * @var array\n     */\n    protected $listen = [\n        'Illuminate\\Auth\\Events\\Registered' =\u003e [\n            'ViktorMiller\\LaravelConfirmation\\Listeners\\EmailConfirmation'\n        ]\n    ];\n``` \n\n6. Run migrations\n    \n        php artisan migrate\n\t\n7. Run artisan confirmation command\n\t\n        php artisan confirmation\n\n\n## Publish ##\n\nIf you want to do some changes or add a language you can publish translations\n\n\tphp artisan vendor:publish --tag=confirmation:translations\n\nIf you want to do some changes on config you can publish config\n\n\tphp artisan vendor:publish --tag=confirmation:config\n\t\n### Console ###\nsupported options\n\n\tphp artisan confirmation -h\n\t\n### Validation ###\nIf you want to allow users to ignore the verification rule \"verified\" for a certain number of hours (for example 24h):\n\nfor Laravel \u003e= 5.4\n\n```php\n$this-\u003evalidate($request, [\n    'email' =\u003e 'required|email|verified:24'\n]);\n``` \n\nfor Laravel \u003e= 5.5\n\n```php\t\nuse ViktorMiller\\LaravelConfirmation\\Rules\\Verified;\n\n$this-\u003evalidate($request, [\n        'email' =\u003e ['required', 'string', new Verified(24)\n    ],\n]);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktor-miller%2Flaravel-confirmation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviktor-miller%2Flaravel-confirmation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktor-miller%2Flaravel-confirmation/lists"}