0 votes

I am exporting my project to a test environment and it is copying over all the models exported by Skipper as expected. I am using Laravel and so far everything is going well.

In order to not change the workflow I need to define latestOfMany() as the relationship default behaviour in the exported Abstract Model.

Is there something I'm missing, can you define such behaviour in Skipper?

Many thanks

in General Questions by (140 points)

Hi,for now this is not possible in Skipper. In case you need to use latestOfMany() it's necessary to define own getter with latestOfMany() flag.

But we will check it if we're are able to implement it somehow to the Skiper for example via Property system. But this would still means to define it for every association manually.

I'm not sure we will be able to define some global flag for this.

public function latestOrder(): HasOne { return $this->hasOne(Order::class)->latestOfMany(); }

Hi

Thank you for your consideration. Yes, custom property on the model would be needed. I've altered my work-flow to only update Abstract files. In the files they are designated not to be edited by the comments at the top, so I will update these when exporting but not the others.

Many thanks.

Please log in or register to answer this question.