<?php

namespace FluxBB\Actions;

use FluxBB\Core\Action;
use FluxBB\Models\CategoryRepository;

class Home extends Action
{
    /**
     * The category repository instance.
     *
     * @var \FluxBB\Models\CategoryRepository
     */
    protected $categories;


    public function __construct(CategoryRepository $repository)
    {
        $this->categories = $repository;
    }

    protected function run()
    {
        $category = $this->categories->findBySlug('/');

        $this->data['category'] = $category;
        $this->data['categories'] = $this->categories->getByParent('/');
        $this->data['conversations'] = $this->categories->getConversationsIn($category);
    }
}

<?php

namespace FluxBB\Actions;

use FluxBB\Core\Action;
use FluxBB\Server\Request;

class Home extends Action
{
    protected function run()
    {
        $this->redirectTo(
            new Request('category', ['slug' => '/'])
        );
    }
}

Make the home page redirect to its category URL.
Make the home page redirect to its category URL.
