laravel - 找不到自定义类

I want to create my custom repository classes so I have created repository class which extends abstract class (with base, model methods):
BoardCategoryRepository

namespace App\Repositories\Board;

use App\Repositories\Repository;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;

class BoardCategoryRepository extends Repository
{
    public function getAllCategoriesWithBoards(): Collection
    {
        return DB::table('board_category')
            ->join('board', 'board_category.id', '=', 'board.category_id')
            ->get()
        ;
    }
}

HomeController

namespace Community\Http\Controllers;

use App\Repositories\Board\BoardCategoryRepository;
use Community\BoardCategory;
use function compact;
use Illuminate\View\View;

class HomeController extends Controller
{
    /**
     * @var BoardCategoryRepository
     */
    protected $boardCategoryRepository;

    public function __construct(BoardCategory $boardCategory)
    {
        $this->boardCategoryRepository = new BoardCategoryRepository($boardCategory);
    }
}

and composer dump-autoload but I getting error Class 'App\Repositories\Board\BoardCategoryRepository' not found - why?

The namespace for your Repository is App\Repositories\Board but your controller's namespace is Community\Http\Controllers. Should it in fact be Community\Http\Controllers.

Alternatively, check in your composer.json and look for the PSR-4 section check to see App is registered there. For example;

 "psr-4": {
      "App\\": "app/"
 }