ToolboxHelper::getOriginal handle strict model attribute is not translatable
This commit is contained in:
parent
6edeac844e
commit
13a503e47c
1 changed files with 4 additions and 1 deletions
|
|
@ -318,7 +318,10 @@ class ToolboxHelper
|
|||
*/
|
||||
public static function getOriginal(Model $model, string $attribute): mixed
|
||||
{
|
||||
if (\in_array('Spatie\Translatable\HasTranslations', \class_uses_recursive($model))) {
|
||||
if (
|
||||
\in_array('Spatie\Translatable\HasTranslations', \class_uses_recursive($model)) and
|
||||
$model->isTranslatableAttribute($attribute)
|
||||
) {
|
||||
return $model->getTranslation(
|
||||
$attribute,
|
||||
$model->getLocale(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue