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 -

excel vba - VBA Proxy auto-configuration for http requests -

sql server 2008 - split ssrs expression between 2 words -