Apel Mahmud
Apel Mahmud

Reputation: 19

Laravel Backpack List Not Displaying

I can add data successfully, but while I am trying to load the list it does not show any data and showing an error message.

Error loading page. Please refresh the page.

Also, I did not get any errors by inspecting the page. Thank you.

Upvotes: 0

Views: 1412

Answers (2)

bgeertsema2000
bgeertsema2000

Reputation: 21

If you can add data properly you either have a typo in your List function, or you have a different name for id in your table, that's what my problem was. To fix, add in your model :

protected $primaryKey = 'your_id';

Upvotes: 1

tabacitu
tabacitu

Reputation: 6193

I think this is most likely a misconfigured column.

I recommend you comment your addColumn() statements one by one, to see which one is the problem. Then take another look at how that column is defined, using the docs.

Upvotes: 1

Related Questions