Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet committed Mar 17, 2024
1 parent 5a1b48f commit fd66ad1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/.phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":1,"defects":{"Tests\\Unit\\ExistingFileTest::it_can_load_a_file_from_a_public_disk":8,"Tests\\Unit\\ExistingFileTest::it_can_load_a_file_from_a_disk_without_a_preview":8,"Tests\\Unit\\ExistingFileTest::it_can_load_multiple_files_at_once":8,"Tests\\Unit\\ExistingFileTest::it_can_serialize_the_instance_and_make_an_instance_out_of_it":8},"times":{"Tests\\Unit\\BladeDirectivesTest::it_parses_the_expression_into_a_name_and_function":0.007,"Tests\\Unit\\BladeDirectivesTest::it_parses_the_expression_without_a_second_argument":0,"Tests\\Unit\\BladeDirectivesTest::it_parses_the_expression_into_a_name_and_function_and_you_can_use_the_key":0,"Tests\\Unit\\BladeDirectivesTest::it_parses_the_expression_into_a_name_and_function_and_use_a_variable_from_outside_the_scope":0,"Tests\\Unit\\Bridge\\ComponentControllerTest::it_aborts_when_the_request_is_incomplete":0.024,"Tests\\Unit\\Bridge\\ComponentControllerTest::it_aborts_when_the_request_has_no_valid_signature":0.002,"Tests\\Unit\\Bridge\\ComponentControllerTest::it_aborts_when_it_cant_resolve_the_instance":0.126,"Tests\\Unit\\Bridge\\ComponentControllerTest::it_applies_the_original_middleware":0.004,"Tests\\Unit\\Bridge\\ComponentControllerTest::it_makes_sure_the_component_method_exists":0.02,"Tests\\Unit\\Bridge\\ComponentControllerTest::it_calls_the_method_without_parameters":0.004,"Tests\\Unit\\Bridge\\ComponentControllerTest::it_calls_the_method_with_a_parameter":0.002,"Tests\\Unit\\Bridge\\ComponentMiddlewareTest::it_resolves_the_route_middleware":0.001,"Tests\\Unit\\Bridge\\ComponentMiddlewareTest::it_substitutes_the_original_bindings":0.001,"Tests\\Unit\\Bridge\\ComponentStateTest::it_can_generate_and_validate_signatures":0.001,"Tests\\Unit\\Bridge\\ComponentStateTest::it_throws_an_exception_when_the_component_can_not_be_resolved":0.048,"Tests\\Unit\\Bridge\\ComponentStateTest::it_can_resolve_an_encrypted_component_from_the_request":0,"Tests\\Unit\\Bridge\\ComponentStateTest::it_can_resolve_an_encrypted_component_from_the_request_and_merge_the_given_props":0.002,"Tests\\Unit\\CleanupTemporaryFileUploadsTest::it_will_clean_files_older_than_one_hour":0.011,"Tests\\Unit\\ExistingFileTest::it_can_load_a_file_from_a_public_disk":0.005,"Tests\\Unit\\ExistingFileTest::it_can_load_a_file_from_a_public_disk_and_generate_a_temporary_url_for_the_preview":0.001,"Tests\\Unit\\ExistingFileTest::it_can_load_a_file_from_a_disk_without_a_preview":0,"Tests\\Unit\\ExistingFileTest::it_throws_an_exception_if_the_file_does_not_exist":0,"Tests\\Unit\\ExistingFileTest::it_can_load_multiple_files_at_once":0,"Tests\\Unit\\ExistingFileTest::it_can_serialize_the_instance_and_make_an_instance_out_of_it":0,"Tests\\Unit\\ExistingFileTest::it_can_load_a_file_from_the_spatie_media_library":0.003,"Tests\\Unit\\ExistingFileTest::it_can_load_a_file_from_the_spatie_media_library_with_a_different_preview_conversion":0.002,"Tests\\Unit\\ExistingFileTest::it_can_load_multiple_files_from_the_spatie_media_library":0.001,"Tests\\Unit\\HeadTest::it_trims_the_title":0,"Tests\\Unit\\HeadTest::it_prepends_the_prefix":0,"Tests\\Unit\\HeadTest::it_doesnt_prepend_the_prefix_if_its_the_same_as_the_title":0,"Tests\\Unit\\HeadTest::it_appends_the_prefix":0,"Tests\\Unit\\HeadTest::it_doesnt_append_the_suffix_if_its_the_same_as_the_title":0,"Tests\\Unit\\HeadTest::it_can_fill_the_twitter_defaults":0,"Tests\\Unit\\HeadTest::it_can_fill_the_open_graph_defaults":0,"Tests\\Unit\\HeadTest::it_can_fill_the_twitter_defaults_and_then_auto_fills":0,"Tests\\Unit\\HeadTest::it_can_fill_the_open_graph_defaults_and_then_auto_fills":0,"Tests\\Unit\\HeadTest::it_can_render_the_canonical_link":0.001,"Tests\\Unit\\HeadTest::it_is_macroable":0,"Tests\\Unit\\SerializesNewModelsTest::it_serializes_and_restores_existing_models":0.001,"Tests\\Unit\\SerializesNewModelsTest::it_serializes_and_restores_new_models":0,"Tests\\Unit\\SerializesNewModelsTest::it_serializes_and_restores_a_collection_of_existing_models":0.001,"Tests\\Unit\\SerializesNewModelsTest::it_serializes_and_restores_a_collection_of_new_models":0,"Tests\\Unit\\SerializesNewModelsTest::it_serializes_and_restores_a_collection_of_mixed_models":0.001,"Tests\\Unit\\SpladeCoreTest::it_generates_a_regular_redirect_on_non_splade_requests":0,"Tests\\Unit\\SpladeCoreTest::it_can_generate_a_409_response_with_a_target_url":0,"Tests\\Unit\\SpladeCoreTest::it_can_use_a_custom_exception_hanlder":0.004,"Tests\\Unit\\SpladeMiddlewareTest::it_can_format_a_url_into_a_host_and_port_with_defaults":0,"Tests\\Unit\\SpladeQueryBuilderTest::it_can_parse_terms":0.004,"Tests\\Unit\\SpladeQueryBuilderTest::it_can_apply_sorting_with_a_closure":0.001,"Tests\\Unit\\SpladeTableTest::it_can_use_a_default_sort_key":0,"Tests\\Unit\\SpladeTableTest::it_prevents_double_pagination":0.001,"Tests\\Unit\\TableExporterTest::it_can_generate_an_array_with_the_headings":0.002,"Tests\\Unit\\TableExporterTest::it_can_generate_an_array_with_the_column_formatting":0.001,"Tests\\Unit\\TableExporterTest::it_can_generate_an_array_with_the_column_styling_or_use_a_callback":0.007,"Tests\\Unit\\TableExporterTest::it_can_map_an_item":0.001,"Tests\\Unit\\TableExporterTest::it_can_return_the_event_callbacks":0,"Tests\\Unit\\ToastTest::it_can_set_a_default_toast":0,"Tests\\Unit\\TransformerTest::it_returns_the_instance_when_no_transformer_has_been_found":0.001,"Tests\\Unit\\TransformerTest::it_throws_an_exception_when_the_transformer_is_invalid":0.001,"Tests\\Unit\\TransformerTest::it_throws_an_exception_when_a_transformer_is_missing":0.001,"Tests\\Unit\\TransformerTest::it_doesnt_throw_an_exception_when_the_transformer_is_missing_when_the_instance_cant_be_transformed":0.001,"Tests\\Unit\\TransformerTest::it_can_transform_using_a_closure":0.001,"Tests\\Unit\\TransformerTest::it_can_transform_a_collection_using_a_closure":0.001,"Tests\\Unit\\TransformerTest::it_can_transform_using_an_api_resource":0.002,"Tests\\Unit\\TransformerTest::it_can_transform_a_collection_using_an_api_resource":0.001,"Tests\\Unit\\TransformerTest::it_can_transform_an_array_using_an_api_resource":0.001,"Tests\\Unit\\TransformerTest::it_can_transform_using_a_fractal_transformer":0.003,"Tests\\Unit\\TransformerTest::it_can_transform_a_collection_using_a_fractal_transformer":0.001,"Tests\\Unit\\TransformerTest::it_can_transform_using_an_instance_that_has_a_transform_method":0.001,"Tests\\Unit\\WithVueTest::it_can_apply_middleware":0.001,"Tests\\Unit\\WithVueTest::it_return_public_available_methods":0,"Tests\\Unit\\WithVueTest::it_can_restore_data_properties_from_an_array":0,"Tests\\Unit\\WithVueTest::it_can_serialize_data_properties":0}}
{"version":1,"defects":[],"times":{"Tests\\Browser\\Form\\RelationsTest::it_can_find_the_default_value_of_a_nested_relationship":0.692,"Tests\\Browser\\Form\\RelationsTest::it_can_handle_a_belongs_to_many_relationship":0.656,"Tests\\Browser\\Form\\RelationsTest::it_can_handle_a_belongs_to_many_relationship_with_the_choices_library":3.343,"Tests\\Browser\\Form\\RelationsTest::it_can_handle_a_morph_to_many_relationship":0.602,"Tests\\Browser\\Form\\RelationsTest::it_can_handle_a_relationship_with_checkboxes":0.526,"Tests\\Browser\\Form\\RelationsTest::it_can_have_two_forms_in_a_view_without_mixing_data":0.429}}
2 changes: 2 additions & 0 deletions src/Components/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ private function getAttachedKeysFromRelation(string $relationName): ?array
return $relation->getBaseQuery()
->get($relation->getRelated()->qualifyColumn($relatedKeyName))
->pluck($relatedKeyName)
->map(fn ($key) => (string) $key)
->all();
}

Expand All @@ -375,6 +376,7 @@ private function getAttachedKeysFromRelation(string $relationName): ?array
return $relation->getBaseQuery()
->get($relation->getQuery()->qualifyColumn($parentKeyName))
->pluck($parentKeyName)
->map(fn ($key) => (string) $key)
->all();
}

Expand Down

0 comments on commit fd66ad1

Please sign in to comment.