<?php

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

use App\Http\Controllers\Controller;
use App\Http\Requests\StoreKegiatanpkapkRequest;
use App\Http\Requests\UpdateKegiatanpkapkRequest;
use App\Kegiatanpkapk;

class KegiatanpkapkApiController extends Controller
{
    public function index()
    {
        $kegiatanpkapks = Kegiatanpkapk::all();

        return $kegiatanpkapks;
    }

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

    public function update(UpdateKegiatanpkapkRequest $request, Kegiatanpkapk $kegiatanpkapk)
    {
        return $kegiatanpkapk->update($request->all());
    }

    public function show(Kegiatanpkapk $kegiatanpkapk)
    {
        return $kegiatanpkapk;
    }

    public function destroy(Kegiatanpkapk $kegiatanpkapk)
    {
        return $kegiatanpkapk->delete();
    }
}
