/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($slug) { $thread = Thread::findBySlug($slug); Thread::destroy($thread->id); return Redirect::route('thread.index'); }
public function index() { $threads = Thread::paginate(10)->sortByDesc('id'); $cats = Category::all(); return view('site.index', ['threads' => $threads, 'cats' => $cats]); }