feat: register & login

This commit is contained in:
2025-09-01 20:21:00 +03:30
parent ed377842c9
commit 4c4c3c5f7b
3 changed files with 103 additions and 67 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
class TestHash extends Command
{
protected $signature = 'test:hash';
protected $description = 'Test Hash::make and Hash::check';
public function handle()
{
$plain = 'mypassword123';
$hashed = Hash::make($plain);
$this->info("Plain: $plain");
$this->info("Hashed: $hashed");
$check = Hash::check($plain, $hashed) ? 'Match' : 'Does not match';
$checkWrong = Hash::check('wrongpass', $hashed) ? 'Match' : 'Does not match';
$this->info("Check correct password: $check");
$this->info("Check wrong password: $checkWrong");
}
}