Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions app/Console/Commands/ResetUserPassword.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace App\Console\Commands;

use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;

class ResetUserPassword extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:reset-user-password
{email : The email address of the user}';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Reset the password for a user\'s account.';

/**
* Execute the console command.
*/
public function handle()
{
$user = User::firstWhere('email', $this->argument('email'));

if (! $user) {
// couldn't find the user so should fail.
$this->error('Could not find a user with the email address of '.$$this->argument('email'));

Command::FAILURE;
}

$password = $this->secret('What is the password?');

$user->update([
'password' => Hash::make($password),
]);

Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion app/Jobs/DeleteResultsData.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\DB;

class DeleteResultsData implements ShouldQueue, ShouldBeUnique
class DeleteResultsData implements ShouldBeUnique, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/ExecSpeedtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;

class ExecSpeedtest implements ShouldQueue, ShouldBeUnique
class ExecSpeedtest implements ShouldBeUnique, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

Expand Down
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

Route::redirect('/', '/admin');

Route::redirect('/login', '/admin/login');

if (app()->isLocal()) {
require __DIR__.'/test.php';
}