Support the ongoing development of →
Laravel Views
Last updated 2 years ago.

Why are you passing Entries object to this method?


In ur controller ur passing entry and in the blade file ur trying to loop through variable called entries hence it fails to identify the variable entry. Below is the updated controller method.

public function showUpload(Entries $entry)
  $entries = Entries::with('entrys')->where('user_id', '=', Auth::user()->id)->get();
  return view('viewentry', compact('entries'));

I updated the controller code to what you suggested but it still isn't working as it should.


Sign in to participate in this thread!


Your banner here too?

Luke Frost Luke Frost lukefrost Joined 9 Aug 2017


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

Your logo here?

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

© 2024 - All rights reserved.