mertefe
Bir yerde yanlışım var ama bulamadım.
Şu şekilde döngü içinde {{$customer->country-country}} diyerek çekebiliyor olmam gerekir değil mi ?
Oysa ; Trying to get property 'country' of non-object hatasını alıyorum.
@foreach($customers as $customer)
{{$customer->customer_name}} : {{$customer->country_id}} <br>
{{$customer->country->country}}
@endforeach
{{$customer->country}} olarak kullanınca ise doğru şekilde şöyle çıktı alıyorum
{"id":190,"country":"T\u00fcrkiye","created_at":null,"updated_at":"2020-09-19T06:11:20.000000Z","created_by":null,"updated_by":null,"status":1}
Neden {{$customer->country->country}} şeklinde sadece Türkiye'yi alamıyorum ve hata alıyorum ?
Not : Evet, modelimin ismi Country, ülke adının tutulduğu field ismi de country.