open-admin icon indicating copy to clipboard operation
open-admin copied to clipboard

getAttribute to getOriginalRaw value ?

Open kaanakyuz opened this issue 2 years ago • 0 comments

Hi folks ,

i have method in Model getTimeattribute -> TIME COLUMN and have ( Value 32 )

public function getTimeAttribute()
{
    return  CarbonInterval::minute($this->time)->cascade()->forHumans();
}

then on grid or frontend $query->time show ( 32 Minute ) but ;

getAttribute also get mutated value to form field ( 32 Minute )

$form->number('time', __('Minute')); get mutated value ( 32 Minute) and doesnt show..

How to use $form->getOriginalRaw('time') to form input ?? it will get 32 int ... is it posibly to that usage ?

i tried $form->number('video_time', __('Minute'))->original(); // is there any default function to get raw column value ?

kaanakyuz avatar Jan 10 '24 16:01 kaanakyuz