Skip to content

Commit 971279e

Browse files
committed
remove try/catches
1 parent 76c1f9e commit 971279e

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/Filament/Integration/Builders/FormContainer.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Filament\Schemas\Components\Grid;
66
use Illuminate\Database\Eloquent\Model;
7-
use Throwable;
87

98
final class FormContainer extends Grid
109
{
@@ -48,22 +47,7 @@ public function only(array $fieldCodes): static
4847
private function generateSchema(): array
4948
{
5049
// Inline priority: explicit ?? record ?? model class
51-
$record = null;
52-
$modelClass = null;
53-
54-
try {
55-
$record = $this->getRecord();
56-
} catch (Throwable $throwable) {
57-
// Record not available yet
58-
}
59-
60-
try {
61-
$modelClass = $this->getModel();
62-
} catch (Throwable $throwable) {
63-
// Model class not available yet
64-
}
65-
66-
$model = $this->explicitModel ?? $record ?? $modelClass;
50+
$model = $this->explicitModel ?? $this->getRecord() ?? $this->getModel();
6751

6852
if ($model === null) {
6953
return []; // Graceful fallback

0 commit comments

Comments
 (0)