#591 - storage-providers

This commit is contained in:
Saeed Vaziry
2025-05-19 00:13:17 +02:00
parent 5a00d35eba
commit 563b9c5909
15 changed files with 517 additions and 39 deletions

View File

@ -4,6 +4,7 @@
use App\Models\Project;
use App\Models\StorageProvider;
use Illuminate\Support\Facades\Validator;
class EditStorageProvider
{
@ -12,6 +13,8 @@ class EditStorageProvider
*/
public function edit(StorageProvider $storageProvider, Project $project, array $input): StorageProvider
{
Validator::make($input, self::rules())->validate();
$storageProvider->profile = $input['name'];
$storageProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id;