0 votes

Hey guys - so the doc block comments don't work property for a few types.

In Skipper when you select a UUID column, that should always be cast to a string.

In Skipper, you select a timestamp but in Laravel that would be considered a \Carbon\Carbon instance, and even added to the "dates" array over the casts array. The doc comments say "timestamp" which isn't a valid type and does not support autocomplete features. This forces us to overwrite the type in the parent model.

Example would be:

@property \Carbon\Carbon $created_at

Not sure the best way to handle this on your end, but maybe provide an option to have a custom doc block cast type in Skipper so if you're making use of a custom caster of sorts, that would make it easy to just provide the actual class name which would be referenced in the blocks...

in Bug report by (160 points)

Just checked our codebase and \Carbon\Carbon type is exported for these types:

@type='dateTime' or @type='dateTimeTz' or @type='date' or @type='time' or @type='timeTz'

Are you sure that timestamp should be exported as Carbon too?

I'm not Laravel dev, so I can't tell. Regarding uuid, there is no rule for it, so we will add it.

2 Answers

0 votes

Hi, thank you for the info. If I remember correctly, Skipper should already have some translation table between orm types and property types. But I have to check that.

by Skipper developer (138k points)
0 votes

The new beta is ready with fixes for these issues:

https://www.skipper18.com/support/402/downloads-skipper-beta

  • timestamp and timestamptz is exported as \Carbon\Carbon
  • uuid is exported as string
  • new property docPropertyType for type customization

Please test it and let me know.

by Skipper developer (138k points)

Hi Ludek,

Thanks for getting on this so fast. If you think that requiring a doc prop type column for specification would be better I could live with that too. I think that most people using any date field while using Eloquent models would be using the carbon cast... but maybe it would be better to specifically ask for it in the UI of Skipper? Not 100% sure what's best for "the world" vs. what's best for our typical use case.

I'll test that out - cool thanks for being so responsive, it's great to see that :)

We're currently also not sure if set \Carbon as default for timestamp or not. We already asked several other developers who are helping us with the Laravel support.