Skip to content

Instantly share code, notes, and snippets.

@ziadoz
Created October 11, 2022 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziadoz/5b93be1d6887696a7a1e873f2fd3c505 to your computer and use it in GitHub Desktop.
Save ziadoz/5b93be1d6887696a7a1e873f2fd3c505 to your computer and use it in GitHub Desktop.
Generate Laravel Password Reset Token For Testing
<?php
use Illuminate\Auth\Passwords\PasswordBroker;
$token = app()->get(PasswordBroker::class)->createToken(
User::query()->where('email', '=', 'me@example.com')->first()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment