<?php

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

use App\Dokuman;
use App\Http\Controllers\Controller;
use App\Http\Requests\StoreDokumanRequest;
use App\Http\Requests\UpdateDokumanRequest;

class DokumenApiController extends Controller
{
    public function index()
    {
        $dokumen = Dokuman::all();

        return $dokumen;
    }

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

    public function update(UpdateDokumanRequest $request, Dokuman $dokuman)
    {
        return $dokuman->update($request->all());
    }

    public function show(Dokuman $dokuman)
    {
        return $dokuman;
    }

    public function destroy(Dokuman $dokuman)
    {
        return $dokuman->delete();
    }
}
