Esempio n. 1
0
 public function home()
 {
     $materials = Auth::User()->material->sortByDesc('updated_at');
     $liked = Material::whereLiked(Auth::User()->id)->with('likeCounter')->get();
     return view('user.home', compact('materials', 'liked'));
 }