Skip to content

Commit 17c0ff1

Browse files
authored
fix: catagraphy parent record (#425)
1 parent 8d4ef7d commit 17c0ff1

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

app/Filament/Resources/Beneficiaries/Resources/Catagraphies/Concerns/GetRecordFromParentRecord.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@
44

55
namespace App\Filament\Resources\Beneficiaries\Resources\Catagraphies\Concerns;
66

7+
use App\Models\Catagraphy;
8+
79
trait GetRecordFromParentRecord
810
{
911
public function mount(int | string | null $record = null): void
1012
{
11-
$this->record = $this->getParentRecord()->catagraphy;
13+
$this->record = $this->getRecord();
1214

1315
$this->authorizeAccess();
1416

1517
if (! method_exists($this, 'hasInfolist') || ! $this->hasInfolist()) {
1618
$this->fillForm();
1719
}
1820
}
21+
22+
public function getRecord(): Catagraphy
23+
{
24+
return $this->getParentRecord()->catagraphy;
25+
}
1926
}

0 commit comments

Comments
 (0)