This commit is contained in:
Saeed Vaziry
2025-05-19 20:55:32 +02:00
parent cdc012c270
commit 04d52f6742
10 changed files with 333 additions and 21 deletions

View File

@ -5,6 +5,7 @@
use App\Models\SshKey;
use App\Models\User;
use App\ValidationRules\SshKeyRule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class CreateSshKey
@ -16,6 +17,8 @@ class CreateSshKey
*/
public function create(User $user, array $input): SshKey
{
Validator::make($input, self::rules())->validate();
$key = new SshKey([
'user_id' => $user->id,
'name' => $input['name'],