public function deleteComment(Request $request) { $c = Comment::findOrFail($request->get('comment_id')); $u = User::findOrFail(Auth::id()); if ($u->id != $c->user_id && $u->flag != 1) { return 'You ain\'t got access bro'; } else { $c->activated = false; $c->save(); return \Redirect::back()->with('message', 'Deleted (go to admin panel to un-delete it)'); } }
public function comments() { $comments = Comment::all(); return view('admin.comments')->with('comments', $comments); }