Support the ongoing development of Laravel.io →
Database Eloquent Views
Last updated 2 years ago.
0

so what happens when you run this code?

also $iklans = iklan::latest()->paginate(5); can you do a dd(ilkans); to see what is outputted?

0

shez1983 said:

so what happens when you run this code?

also $iklans = iklan::latest()->paginate(5); can you do a dd(ilkans); to see what is outputted?

No error but if get the data $iklan->category only ID shown.

Do I need relationship to category table ?

$iklan->category->name;

So I can get category name with this table.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

ccristia ccristia Joined 27 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.