Beispiel #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\RedirectResponse
  */
 public function destroy($id)
 {
     $backer = Backer::find($id);
     $backer->delete();
     Session::flash('message', 'Successfully deleted');
     return redirect(route('backer'));
 }
Beispiel #2
0
 /**
  * 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'));
 }