Migration column modifiers

Posted 2 years ago by rorymcdaniel

I was looking at the documentation for migrations this morning and I noticed the ->storedAs($expression) and ->virtualAs($expression) but I can't seem to find any other reference as to how these might be used.

Does anybody have any examples of how to use these? I can see how they could be useful, but I'm not exactly sure what my expression would look like.

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.