如何让当前用户执行Laravel命令?

I am trying to build a custom configuration that gets added to my Laravel configuration at boot up. I created an artisan command that allows the developers to place the server into 'test' mode and 'live' mode. This should then force API's to use test keys rather than live keys which works fine.

public function handle()
{
    switch(strtoupper($this->argument('m'))) {
        case 'LIVE':
            \DB::table('server_mode')->where('id', 1)->update([
                'mode' => true,
                'verified_by' => 'Server'
            ]);
            $this->info('Server is now in LIVE mode');
            break;
        case 'TEST':
            \DB::table('server_mode')->where('id', 1)->update([
                'mode' => false,
                'verified_by' => 'Server'
            ]);
            $this->info('Server is now in TEST mode');
            break;
        default:
            $this->error('Please enter either LIVE or TEST');
            break;
    }
}

The problem is, I want to add which developer changed the status. So far, it is hard coded to 'Server'. Is it possible to get the IP or PC information who'm executed the command to store in the DB?

As said in the comments, Jaquarh doesn't try to authenticate. He just wants to get the username of the perso who ran the command.

You can use $processUser = exec('whoami'); to get the current user name. (It won't work on windows)

However, be careful, usernames are not always very informative. My laptop at work came preinstalled with a user name "User".

Another idea that I can suggest is to force a "name" parameter when using your command.