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

You have to write your controller method like this way using "compact"

public function getDashboard() { 
  $posts = Post::all(); 
  return view('dashboard', compact('posts')); 
}
0

I actually tried that and it didnt work

0

Sign in to participate in this thread!

Eventy

Your banner here too?

nikona14 nikona14 Joined 8 Dec 2016

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.