Support the ongoing development of Laravel.io →
Database Eloquent

Hi,

is it possible to have variables in the Schema builder?

$table->string('us_ico')->default('img/employer/skills/'.id.'/us.jpg');

the id should be grabbed from the row the value is stored in.

I hope this makes sense.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

elker elker Joined 17 May 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.