I have 2 columns start_date and end_date. I want to calculate the time difference between them and write them to the database
My code :
TextInput::make('total_of_days')
->disabled()
->formatStateUsing(fn(\Closure $get) => Carbon::parse($get('start_date'))->diffInDays(Carbon::parse($get('end_date'))))
->dehydrated(true)
->required(),
But not working.