diff --git a/app/Http/Controllers/DiscoverController.php b/app/Http/Controllers/DiscoverController.php new file mode 100644 index 000000000..9dd12c449 --- /dev/null +++ b/app/Http/Controllers/DiscoverController.php @@ -0,0 +1,22 @@ +firstOrFail(); + $posts = $tag->posts()->has('media')->orderBy('id','desc')->paginate(12); + $count = $tag->posts()->has('media')->orderBy('id','desc')->count(); + return view('discover.tags.show', compact('tag', 'posts', 'count')); + } +} diff --git a/resources/views/discover/tags/show.blade.php b/resources/views/discover/tags/show.blade.php new file mode 100644 index 000000000..bacc30178 --- /dev/null +++ b/resources/views/discover/tags/show.blade.php @@ -0,0 +1,37 @@ +@extends('layouts.app') + +@section('content') + +
+ +
+
+
+ +
+
+
+
+
+ {{$tag->name}} +
+

+ {{$count}} posts +

+
+
+
+ +
+ @foreach($posts as $status) +
+ + + +
+ @endforeach +
+ +
+ +@endsection \ No newline at end of file