mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
27 lines
646 B
PHP
Executable File
27 lines
646 B
PHP
Executable File
<?php
|
|
|
|
namespace App\SSHCommands\Database;
|
|
|
|
use App\SSHCommands\Command;
|
|
use Illuminate\Support\Facades\File;
|
|
|
|
class DeleteUserCommand extends Command
|
|
{
|
|
public function __construct(protected string $provider, protected string $username, protected string $host)
|
|
{
|
|
}
|
|
|
|
public function file(): string
|
|
{
|
|
return File::get(resource_path(sprintf("commands/database/%s/delete-user.sh", $this->provider)));
|
|
}
|
|
|
|
public function content(): string
|
|
{
|
|
return str($this->file())
|
|
->replace('__username__', $this->username)
|
|
->replace('__host__', $this->host)
|
|
->toString();
|
|
}
|
|
}
|