mardi 15 mars 2016

Return column constraints using Laravel Schema Builder

I can use the following to return an array of columns in my database table;

$column_names = DB::getSchemaBuilder()->getColumnListing('tablename');

But is there a method to return the accepted values on each particular column? I have a lot of columns that are enums for example and I would like to return those (perhaps in a multidimensional array) so I can use it in a Unit test.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire