#591 - server-logs

This commit is contained in:
Saeed Vaziry
2025-05-30 13:52:39 +02:00
parent 104cd2fce8
commit 857319025f
10 changed files with 416 additions and 54 deletions

View File

@ -1,34 +0,0 @@
<?php
namespace App\Actions\Server;
use App\Models\Server;
use Illuminate\Validation\ValidationException;
class CreateServerLog
{
/**
* @param array<string, mixed> $input
*
* @throws ValidationException
*/
public function create(Server $server, array $input): void
{
$server->logs()->create([
'is_remote' => true,
'name' => $input['path'],
'type' => 'remote',
'disk' => 'ssh',
]);
}
/**
* @return array<string, string>
*/
public static function rules(): array
{
return [
'path' => 'required',
];
}
}