This commit is contained in:
Saeed Vaziry
2023-07-02 12:47:50 +02:00
commit 5c72f12490
825 changed files with 41659 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace App\ServerProviders;
use App\Contracts\ServerProvider;
use App\Models\Server;
use Illuminate\Support\Facades\Storage;
abstract class AbstractProvider implements ServerProvider
{
protected ?Server $server;
public function __construct(Server $server = null)
{
$this->server = $server;
}
protected function generateKeyPair(): void
{
generate_key_pair(Storage::disk(config('core.key_pairs_disk'))->path((string) $this->server->id));
}
}