Tablica columns sluzy do pobrania nazw kolumn z konkretnej tabeli, natomiast tablica array sluzy do pobierania wartosci z tej samej tabeli.
tablica $columns
array(11) { [0]=> object
(stdClass
)#240 (6) { ["Field"]=> string(2) "id" ["Type"]=> string(7) "int(11)" ["Null"]=> string(2) "NO" ["Key"]=> string(3) "PRI" ["Default"]=> NULL ["Extra"]=> string(14) "auto_increment" } [1]=> object(stdClass)#1115 (6) { ["Field"]=> string(4) "city" ["Type"]=> string(12) "varchar(255)" ["Null"]=> string(2) "NO" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [2]=> object(stdClass)#1114 (6) { ["Field"]=> string(6) "powiat" ["Type"]=> string(12) "varchar(255)" ["Null"]=> string(2) "NO" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [3]=> object(stdClass)#1113 (6) { ["Field"]=> string(3) "lat" ["Type"]=> string(13) "decimal(10,7)" ["Null"]=> string(3) "YES" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [4]=> object(stdClass)#1112 (6) { ["Field"]=> string(3) "lng" ["Type"]=> string(13) "decimal(10,7)" ["Null"]=> string(3) "YES" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [5]=> object(stdClass)#1111 (6) { ["Field"]=> string(5) "count" ["Type"]=> string(7) "int(11)" ["Null"]=> string(2) "NO" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [6]=> object(stdClass)#1110 (6) { ["Field"]=> string(5) "email" ["Type"]=> string(12) "varchar(255)" ["Null"]=> string(3) "YES" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [7]=> object(stdClass)#1109 (6) { ["Field"]=> string(3) "key" ["Type"]=> string(4) "text" ["Null"]=> string(3) "YES" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [8]=> object(stdClass)#1108 (6) { ["Field"]=> string(6) "accept" ["Type"]=> string(10) "tinyint(4)" ["Null"]=> string(3) "YES" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [9]=> object(stdClass)#1107 (6) { ["Field"]=> string(10) "created_at" ["Type"]=> string(8) "datetime" ["Null"]=> string(3) "YES" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } [10]=> object(stdClass)#1106 (6) { ["Field"]=> string(10) "updated_at" ["Type"]=> string(8) "datetime" ["Null"]=> string(3) "YES" ["Key"]=> string(0) "" ["Default"]=> NULL ["Extra"]=> string(0) "" } }
tablica $array
object(Illuminate\Database\Eloquent\Collection)#1116 (1) { ["items":protected]=> array(874) { [0]=> object(City)#241 (19) { ["table"]=> string(6) "cities" ["connection":protected]=> NULL ["primaryKey":protected]=> string(2) "id" ["perPage":protected]=> int(15) ["incrementing"]=> bool(true) ["timestamps"]=> bool(true) ["attributes":protected]=> array(11) { ["id"]=> int(24) ["city"]=> string(8) "BIERUĹ " ["powiat"]=> string(22) "BIERUĹSKO-LÄDZIĹSKI" ["lat"]=> string(10) "50.0899900" ["lng"]=> string(10) "19.0929100" ["count"]=> int(7) ["email"]=> string(33) "radoslaw.wojtkiewicz@egplusww.com" ["key"]=> string(32) "6da8ec98fb5f2d58a40bd71cf962ed0d" ["accept"]=> int(1) ["created_at"]=> NULL ["updated_at"]=> string(19) "2014-10-22 07:37:04" } ["original":protected]=> array(11) { ["id"]=> int(24) ["city"]=> string(8) "BIERUĹ " ["powiat"]=> string(22) "BIERUĹSKO-LÄDZIĹSKI" ["lat"]=> string(10) "50.0899900" ["lng"]=> string(10) "19.0929100" ["count"]=> int(7) ["email"]=> string(33) "radoslaw.wojtkiewicz@egplusww.com" ["key"]=> string(32) "6da8ec98fb5f2d58a40bd71cf962ed0d" ["accept"]=> int(1) ["created_at"]=> NULL ["updated_at"]=> string(19) "2014-10-22 07:37:04" } ["relations":protected]=> array(0) { } ["hidden":protected]=> array(0) { } ["visible":protected]=> array(0) { } ["appends":protected]=> array(0) { } ["fillable":protected]=> array(0) { } ["guarded":protected]=> array(1) { [0]=> string(1) "*" } ["dates":protected]=> array(0) { } ["touches":protected]=> array(0) { } ["with":protected]=> array(0) { } ["exists"]=> bool(true) ["softDelete":protected]=> bool(false) } [1]=> object(City)#242 (19) { ["table"]=> string(6) "cities" ["connection":protected]=> NULL ["primaryKey":protected]=> string(2) "id" ["perPage":protected]=> int(15) ["incrementing"]=> bool(true) ["timestamps"]=> bool(true) ["attributes":protected]=> array(11) { ["id"]=> int(25) ["city"]=> string(12) "OSTROĹÄKA " ["powiat"]=> string(11) "OSTROĹÄKA" ["lat"]=> string(10) "53.0876544" ["lng"]=> string(10) "21.5592554" ["count"]=> int(6) ["email"]=> NULL ["key"]=> NULL ["accept"]=> NULL ["created_at"]=> NULL ["updated_at"]=> NULL } ["original":protected]=> array(11) { ["id"]=> int(25) ["city"]=> string(12) "OSTROĹÄKA " ["powiat"]=> string(11) "OSTROĹÄKA" ["lat"]=> string(10) "53.0876544" ["lng"]=> string(10) "21.5592554" ["count"]=> int(6) ["email"]=> NULL ["key"]=> NULL ["accept"]=> NULL ["created_at"]=> NULL ["updated_at"]=> NULL } ["relations":protected]=> array(0) { } ["hidden":protected]=> array(0) { } ["visible":protected]=> array(0) { } ["appends":protected]=> array(0) { } ["fillable":protected]=> array(0) { } ["guarded":protected]=> array(1) { [0]=> string(1) "*" } ["dates":protected]=> array(0) { } ["touches":protected]=> array(0) { } ["with":protected]=> array(0) { } ["exists"]=> bool(true) ["softDelete":protected]=> bool(false) } [2]=> object(City)#1117 (19) { ["table"]=> string(6) "cities" ["connection":protected]=> NULL ["primaryKey":protected]=> string(2) "id" ["perPage":protected]=> int(15) ["incrementing"]=> bool(true) ["timestamps"]=> bool(true) ["attributes":protected]=> array(11) { ["id"]=> int(26) ["city"]=> string(20) "KONSTANCIN-JEZIORNA " ["powiat"]=> string(13) "PIASECZYĹSKI" ["lat"]=> string(10) "52.0938717" ["lng"]=> string(10) "21.1177220" ["count"]=> int(1) ["email"]=> NULL ["key"]=> NULL ["accept"]=> NULL ["created_at"]=> NULL ["updated_at"]=> NULL }
itd.