<?php

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

use App\Http\Controllers\Controller;
use App\Http\Requests\StoreReferensiRequest;
use App\Http\Requests\UpdateReferensiRequest;
use App\Referensi;

class ReferensiApiController extends Controller
{
    public function index()
    {
        $referensis = Referensi::all();

        return $referensis;
    }

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

    public function update(UpdateReferensiRequest $request, Referensi $referensi)
    {
        return $referensi->update($request->all());
    }

    public function show(Referensi $referensi)
    {
        return $referensi;
    }

    public function destroy(Referensi $referensi)
    {
        return $referensi->delete();
    }
}
