Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

Take a look at the docs here http://laravel.com/docs/schema#adding-columns

The second parameter is for SQL values, i.e. with $table->string() it's for the length of the varchar field.

Validation would be performed elsewhere, possibly in the controller or it's own class.

Mei

Last updated 2 years ago.
0

Thanks. I did see that but I remember doing something similar like what I did a while ago. Was this kind of validation available in previous releases?

Thanks anyways. Will move the validation to some place else.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

r3s r3s Joined 13 Mar 2014

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.

© 2024 Laravel.io - All rights reserved.