Laravel php tinker command to show tables and structures? -


what command within laravels' php artisan tinker shows tables and/or structure of tables?

to tables, use this:
$tables = \db::select('show tables');.

to columns of table, use this:
$columns = \schema::getcolumnlisting('<table_name>');


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -