NoteForm::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Forms\Builders;
4
5
use App\Models\Note;
6
// use App\Models\Type;
7
use LaravelEnso\Forms\Services\Form;
8
9
class NoteForm
10
{
11
    protected const TemplatePath = __DIR__.'/../Templates/notes.json';
12
13
    protected Form $form;
14
15
    public function __construct()
16
    {
17
        $this->form = new Form(static::TemplatePath);
18
    }
19
20
    public function create()
21
    {
22
        return $this->form
23
 //   ->options('type_id', Type::all())
24
    ->create();
25
    }
26
27
    public function edit(Note $note)
28
    {
29
        return $this->form
30
  //  ->options('type_id', Type::all())
31
    ->edit($note);
32
    }
33
}
34