/** * Display a listing of the resource based on a tag. * * @param $slug * * @return \Illuminate\View\View */ public function tag($slug) { $tag = $this->tag->findBy('slug', $slug); $posts = $tag->posts()->paginate(5); return view('frontend.pages.blog.tag', compact('tag', 'posts')); }
/** * Remove the specified resource from storage. * * @param int $id * * @return \Illuminate\Http\RedirectResponse */ public function destroy($id) { $this->repository->delete($id); return redirect()->route('admin.tags.index'); }