<?php

namespace App\Http\Controllers\General;

use App\Http\Controllers\GeneralController;
use App\Repositories\General\PostRepository;

class CommunityController extends GeneralController
{
    protected $postRepository;

    public function __construct(PostRepository $postRepository)
    {
        parent::__construct();
        $this->postRepository = $postRepository;
    }

    public function index()
    {
        $data = $this->postRepository->getAll();

        return response()->json($data);
    }
}
