<commit_before><?php

namespace App\Http\Controllers;

use App\Post;

class PostsController extends Controller
{
	public function index()
	{
		$posts = Post::latest()->get();

		return view('publications.all', ['posts' => $posts]);
	}

    public function show($slug, Post $post)
    {
        $post = Post::published()->where('slug', $slug)->first();

        return view('publications.show', ['post' => $post]);
    }
}<commit_msg>Remove unpublished posts from homepage posts list<commit_after><?php

namespace App\Http\Controllers;

use App\Post;

class PostsController extends Controller
{
	public function index()
	{
		$posts = Post::published()->latest()->get();

		return view('publications.all', ['posts' => $posts]);
	}

    public function show($slug, Post $post)
    {
        $post = Post::published()->where('slug', $slug)->first();

        return view('publications.show', ['post' => $post]);
    }
}
{'fraction_non_alphanumeric': 0.1814207650273224, 'fraction_numerical': 0.0, 'mean_word_length': 3.9782608695652173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7235772', 'n_tokens_mistral': 283, 'n_tokens_neox': 277, 'n_words': 66}