---
# System prepended metadata

title: BTS 取值
tags: [BTS]

---

---
tags: BTS
---
---
# BTS 取值

## 取全部值
``` 
@dd($data)
```
``` =
array:23 [▼
  "lang" => "en"
  "lang_id" => 2
  "languages" => Illuminate\Database\Eloquent\Collection {#3291 ▶}
  "header_view" => "frontend.default.header"
  "footer_view" => "frontend.default.footer"
  "banner_view" => "frontend.default.banner"
  "banners" => Illuminate\Database\Eloquent\Collection {#2478 ▶}
  "favicon_path" => "favicon.ico"
  "footerMenu" => []
  "headerMenu" => []
  "rawSetting" => Illuminate\Database\Eloquent\Collection {#1691 ▶}
  "setting" => Illuminate\Support\Collection {#3467 ▶}
  "settingCollections" => {#1794 ▶}
  "profileGroups" => array:1 [▶]
  "car" => []
  "footerScripts" => array:42 [▶]
  "headerScripts" => array:17 [▶]
  "hreflangs" => array:3 [▶]
  "listData" => App\Models\Product {#2601 ▶}
  "seo" => array:4 [▶]
  "breadcrumb" => array:1 [▶]
  "filters" => Illuminate\Database\Eloquent\Collection {#3256 ▶}
  "view" => "frontend.product-detail-page"
]
```
### 取 "listData" 值
``` 
@dd($listData)
```

``` = 
App\Models\Product {#2601 ▼
  +rootZero: true
  +sortable: array:2 [▶]
  #fillable: array:7 [▶]
  #connection: "mysql"
  #table: "products"
  #primaryKey: "id"
  #keyType: "int"
  +incrementing: true
  #with: []
  #withCount: []
  #perPage: 15
  +exists: true
  +wasRecentlyCreated: false
  #attributes: array:15 [▼
    "id" => 304
    "order" => 1
    "created_at" => "2021-08-03 16:45:53"
    "updated_at" => "2021-08-16 14:05:58"
    "seo" => array:4 [▶]
    "data" => array:11 [▼
      "image" => array:1 [▶]
      "content" => array:1 [▶]
      "bookmark" => array:1 [▶]
      "active" => "1"
      "name" => "HB-1000CLR"
      "model" => "HB-1000CLR"
      "list-image" => "/storage/media/products/product-list-1.png"
      "short-description" => """
        <h3>Battery Powered Deck Mounted Non-Mixing Faucet</h3>
                <p>power supply mode：Battery Powered Models: - (4) AA Alkaline Batteries</p>
        <p>Battery Service Life: - 400,000 on/off cycles, up to 4 years</p>
        """
      "single-image" => "/storage/media/products/product-list-1.png"
      "index-image" => "/storage/media/products/product-list-1.png"
      "list-description" => "<p>Our experienced team covers the entire program evaluation. We also provide free consultation.</p>"
    ]
    "active" => true
    "brothers" => Illuminate\Database\Eloquent\Collection {#2602 ▶}
    "prev" => null
    "next" => App\Models\Product {#2603 ▶}
    "uri" => "https://demo-hydrotekglobal.gtmc.app/en/product/28e64169ee4f08e7944d6acd5745d79b"
    "banner" => Illuminate\Database\Eloquent\Collection {#2478 ▶}
    "breadcrumbs" => array:1 [▶]
    "category" => Illuminate\Support\Collection {#2710 ▶}
    "like" => []
  ]
  #original: array:6 [▶]
  #changes: []
  #casts: []
  #dates: []
  #dateFormat: null
  #appends: []
  #dispatchesEvents: []
  #observables: []
  #relations: array:4 [▶]
  #touches: []
  +timestamps: true
  #hidden: []
  #visible: []
  #guarded: array:1 [▶]
}
```
### 直接抓取 “attributes” 下 data 的值
#### 較常用的
```
@dd($listData['data'])
```
``` =
array:11 [▼
  "image" => array:1 [▶]
  "content" => array:1 [▶]
  "bookmark" => array:1 [▶]
  "active" => "1"
  "name" => "HB-1000CLR"
  "model" => "HB-1000CLR"
  "list-image" => "/storage/media/products/product-list-1.png"
  "short-description" => """
    <h3>Battery Powered Deck Mounted Non-Mixing Faucet</h3>
            <p>power supply mode：Battery Powered Models: - (4) AA Alkaline Batteries</p>
    <p>Battery Service Life: - 400,000 on/off cycles, up to 4 years</p>
    """
  "single-image" => "/storage/media/products/product-list-1.png"
  "index-image" => "/storage/media/products/product-list-1.png"
  "list-description" => "<p>Our experienced team covers the entire program evaluation. We also provide free consultation.</p>"
]
```
### 取參數
```
@dd($listData['data']['list-image'])
```
``` =
"/storage/media/products/product-list-1.png"
```