|
@@ -60,18 +60,7 @@ class PostsController extends Controller
|
|
|
->filter($request->only(['month', 'year']))
|
|
|
->get();
|
|
|
|
|
|
-
|
|
|
- $archives = Post::selectRaw(<<<EOT
|
|
|
-year(created_at) as year,
|
|
|
-monthname(created_at) as month,
|
|
|
-count(*) published
|
|
|
-EOT
|
|
|
- )->groupBy('year', 'month')
|
|
|
- ->orderByRaw('min(created_at) desc')
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
-
|
|
|
- return view('posts.index', compact('archives', 'posts'));
|
|
|
+ return view('posts.index', compact('archives'));
|
|
|
}
|
|
|
|
|
|
public function show(Post $post)
|