<?php

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

use App\Http\Controllers\Controller;
use App\Http\Requests\StoreReferensipkapkRequest;
use App\Http\Requests\UpdateReferensipkapkRequest;
use App\Referensipkapk;

class ReferensipkapkApiController extends Controller
{
    public function index()
    {
        $referensipkapks = Referensipkapk::all();

        return $referensipkapks;
    }

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

    public function update(UpdateReferensipkapkRequest $request, Referensipkapk $referensipkapk)
    {
        return $referensipkapk->update($request->all());
    }

    public function show(Referensipkapk $referensipkapk)
    {
        return $referensipkapk;
    }

    public function destroy(Referensipkapk $referensipkapk)
    {
        return $referensipkapk->delete();
    }
}
