feat: refactor code and improve readability

This commit is contained in:
Rico van Zelst
2025-03-04 12:50:19 +01:00
parent efc263e257
commit 68d18311b4
8 changed files with 25 additions and 34 deletions

View File

@@ -10,9 +10,7 @@ class PostsController extends Controller
{
public function index()
{
$posts = Sheets::all()->filter(function ($post) {
return ! $post->hidden;
})->sortByDesc('date');
$posts = Sheets::all()->filter(fn($post) => ! $post->hidden)->sortByDesc('date');
$paginatedPosts = Paginate::collection($posts, 6);
return view('posts.index', [