Beispiel #1
0
 /**
  * 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'));
 }
Beispiel #2
0
 /**
  * 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');
 }