【问题标题】:Laravel view not having all properties passed in viewLaravel 视图没有在视图中传递所有属性
【发布时间】:2019-01-24 20:39:29
【问题描述】:

我在将值传递给 laravel 视图时遇到问题 传递给视图的对象具有值

 Collection {#270 ▼
  #items: array:2 [▼
    0 => {#275 ▼
      +"id": 3
      +"category_id": 136
      +"service_name": "ServiceName"
      +"service_description": "fgdgfgfdg"
      +"image": null
      +"created_at": "2018-08-17 18:09:16"
      +"updated_at": "2018-08-17 18:09:16"
      +"something": Collection {#101 ▼
        #items: array:2 [▼
          0 => "ABC"
          1 => "DEF"
        ]
      }
    }
  ]
}

而视图中的对象dd是:-

Collection {#270 ▼
  #items: array:2 [▼
    0 => {#275 ▼
      +"id": 3
      +"category_id": 136
      +"service_name": "ServiceName"
      +"service_description": "fgdgfgfdg"
      +"image": null
      +"created_at": "2018-08-17 18:09:16"
      +"updated_at": "2018-08-17 18:09:16"
    }
  ]
}

如何获取所有值(传递对象的某个属性)。

【问题讨论】:

  • 看不到代码我们帮不了你

标签: php laravel laravel-5.6 laravel-blade


【解决方案1】:

我解决了这个问题。 您需要做的就是用相同的方式检查您的视图作曲家

【讨论】:

  • 什么都不回答……这到底是什么意思?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多