Skip to content

v2.0 - fromRequest not working as intended (?) #173

Answered by rubenvanassche
coreation asked this question in Q&A
Discussion options

You must be logged in to vote

Seems indeed like a bug but cannot replicate it. We have a test which tests this feature (

/** @test */
public function it_can_manually_override_how_the_data_object_will_be_constructed()
{
DataBlueprintFactory::new('OverrideableDataFromRequest')
->withProperty(
DataPropertyBlueprintFactory::new('name')
->withAttribute(WithoutValidation::class)
->withType('string')
)
->withMethod(
DataMagicMethodFactory::new('fromRequest')
->withInputType(Request::class, 'request')
->withBody('return new self("{$request->input(\'first_name\')} {$request->input(\'last_name\'

Replies: 3 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@coreation
Comment options

Comment options

You must be logged in to vote
10 replies
@rubenvanassche
Comment options

@coreation
Comment options

@coreation
Comment options

@rubenvanassche
Comment options

@coreation
Comment options

Answer selected by coreation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants