profile = $input['name']; $storageProvider->project_id = isset($input['global']) && $input['global'] ? null : $project->id; $storageProvider->save(); return $storageProvider; } /** * @throws ValidationException */ public static function rules(): array { return [ 'name' => [ 'required', ], ]; } }