provider = $provider; $this->username = $username; $this->host = $host; $this->database = $database; } public function file(string $os): string { return File::get(base_path('system/commands/database/'.$this->provider.'/link.sh')); } public function content(string $os): string { $command = Str::replace('__username__', $this->username, $this->file($os)); $command = Str::replace('__host__', $this->host, $command); return Str::replace('__database__', $this->database, $command); } }