php - Trying to get all column names in a table -


i found this answer says this:

$columns = schema::getcolumnlisting('users'); 

but doesnt use, suppose should be:

use illuminate\database\schema\builder schema; 

but when try it doesnt work:

$columns = schema::getcolumnlisting("users"); 

i error:

non-static method illuminate\database\schema\builder::getcolumnlisting() should not called statically, assuming $this incompatible context

you can do:

$columns = db::getschemabuilder()->getcolumnlisting('users'); 

and use db; import needed dependencies.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

python - PIL cannot identify image file for io.BytesIO object -

java - disabling a node without disable its children in javafx -