<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Note;

class NotesController extends Controller
{

    public function index(Request $request)
    {
        $rows = Note::all();
        return view('notes.index', compact('rows'));
    }

    public function show(Request $request, $uid)
    {
        $row = Note::where('uid', $uid)->first();
        return view('notes.show', compact('row'));
    }

    public function create(Request $request)
    {
        return view('notes.create');
    }

    public function update(Request $request, $uid)
    {
        $row = Note::where('uid', $uid)->first();
        return view('notes.update', compact('row'));
    }

}
