<?php

namespace App\Livewire\Admin\Forms;

use Livewire\Component;
use App\Models\Admin\Forms;
use Livewire\Attributes\Computed;

class Index extends Component
{

    #[Computed()]
    public function forms()
    {
        return Forms::all();
    }

    public function selectForm($id)
    {
        return $this->redirectRoute('admin.forms.edit', ['form' => $id]);
    }

    public function render()
    {
        return view('livewire.admin.forms.index');
    }
}
