Created
March 16, 2016 08:33
-
-
Save chrisliuqq/2bf5fcfaefa802f94080 to your computer and use it in GitHub Desktop.
get laravel table schema in model
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function getTableColumns() | |
{ | |
return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment