Skip to content

Commit

Permalink
Update return type of model function
Browse files Browse the repository at this point in the history
Handle case where config option isn't supplied for backwards compatability
  • Loading branch information
Fludem committed Jan 22, 2024
1 parent 5f1d929 commit b29dd1e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/FilamentExceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ public static function report(Throwable $exception)
$reporter->reportException($exception);
}

/** @return ExceptionModel */
public static function model()
public static function model() : string
{
$class = config('filament-exceptions.exception_model');
return $class;
if (config('filament-exceptions.exception_model') === null) {
return ExceptionModel::class;
}
return config('filament-exceptions.exception_model');
}

/**
Expand Down

0 comments on commit b29dd1e

Please sign in to comment.