Get table column names in laravel

Add this function in eloquent model:

    public function getTableColumns() {
        return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());
    }