diff --git a/src/eloquent.php b/src/eloquent.php index 486a72c..60959ad 100644 --- a/src/eloquent.php +++ b/src/eloquent.php @@ -55,6 +55,12 @@ function table_name($model): string return $model->getTable(); } +/** + * Get the primary key value from Eloquent model. + * + * @param \Illuminate\Database\Eloquent\Model|null $model + * @return int|string|null + */ function safe_key(?Model $model) { if (\is_null($model)) {