<?php

namespace App\Http\Controllers\Api\V1\Admin;

use App\Http\Controllers\Controller;
use App\Http\Requests\StoreLitmasSidangRequest;
use App\Http\Requests\UpdateLitmasSidangRequest;
use App\LitmasSidang;

class LitmasSidangApiController extends Controller
{
    public function index()
    {
        $litmasSidangs = LitmasSidang::all();

        return $litmasSidangs;
    }

    public function store(StoreLitmasSidangRequest $request)
    {
        return LitmasSidang::create($request->all());
    }

    public function update(UpdateLitmasSidangRequest $request, LitmasSidang $litmasSidang)
    {
        return $litmasSidang->update($request->all());
    }

    public function show(LitmasSidang $litmasSidang)
    {
        return $litmasSidang;
    }

    public function destroy(LitmasSidang $litmasSidang)
    {
        return $litmasSidang->delete();
    }
}
