/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $users = User::all(); $count = $users->count(); $projects = Project::all(); $comments = Comment::all(); $categories = Category::all(); $backers = Backer::all(); $creators = Creator::all(); $commentLast = Comment::all()->take(4); return view('Admin.index', compact('creators', 'count', 'projects', 'comments', 'categories', 'backers', 'commentLast')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $backers = Backer::all(); $backer = Backer::find($id); return view('Admin.backer.edit', compact('backers', 'backer')); }