Exception Not Found
Closed this issue · 3 comments
njsoria commented
Most recent update broke my nova forms. See error message below posted to my slack:
Message
Class 'Laraning\NovaTimeField\Exception' not found
Level
ERROR
UserId
1
Exception
"class": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError",
"message": "Class 'Laraning\\NovaTimeField\\Exception' not found",
"code": 0,
"file": "\/var\/app\/current\/vendor\/laraning\/nova-time-field\/src\/TimeField.php:67",
"trace": [
"\/var\/app\/current\/nova\/src\/Fields\/Field.php:317",
"\/var\/app\/current\/nova\/src\/Fields\/Field.php:296",
"\/var\/app\/current\/nova\/src\/Fields\/Field.php:270",
"\/var\/app\/current\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/HigherOrderCollectionProxy.php:60",
"{\"function\":\"Illuminate\\\\Support\\\\{closure}\",\"class\":\"Illuminate\\\\Support\\\\HigherOrderCollectionProxy\",\"type\":\"->\",\"args\":[\"[object] (Laraning\\\\NovaTimeField\\\\TimeField)\",12]}",
"\/var\/app\/current\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Collection.php:1120",
"\/var\/app\/current\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/HigherOrderCollectionProxy.php:61",
"\/var\/app\/current\/nova\/src\/FillsFields.php:67",
"\/var\/app\/current\/nova\/src\/FillsFields.php:20",
"\/var\/app\/current\/nova\/src\/Http\/Controllers\/ResourceStoreController.php:28",
"\/var\/app\/current\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Concerns\/ManagesTransactions.php:29",
"\/var\/app\/current\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/DatabaseManager.php:349",
"\/var\/app\/current\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Facades\/Facade.php:237",
"\/var\/app\/current\/nova\/src\/Http\/Controllers\/ResourceStoreController.php:44",
"{\"function\":\"handle\",\"class\":\"Laravel\\\\Nova\\\\Http\\\\Controllers\\\\ResourceStoreController\",\"type\":\"->\",\"args\":[\"[object] (Laravel\\\\Nova\\\\Http\\\\Requests\\\\CreateResourceRequest)\",\"days\"]}",
"\/var\/app\/current\/vendor\/laravel\/framework\/src\/Illuminate\/Routin…
Today at 5:16 PM
njsoria commented
You can see how I'm using it:
/**
* Get the time entry fields for the resource.
*
* @return array
*/
protected function schedule(){
return [
Heading::make('<p class="text-danger" style="font-weight:700;font-size:1.4em">Schedule</p>')->asHtml()->hideFromDetail()->hideFromIndex(),
Boolean::make('Billable','is_billable')->help('is the day billable to the client?')->sortable(),
TimeField::make('Scheduled Start Time','scheduled_start_time')->hideFromIndex(),
TimeField::make('Scheduled End Time','scheduled_end_time')->hideFromIndex(),
Text::make('Scheduled Hours', function(){
$diff = abs(strtotime($this->scheduled_end_time) - strtotime($this->scheduled_start_time));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24) / (60*60*24));
$hours = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24) / (60*60));
$minutes = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24 - $hours*60*60) / 60);
return $hours;
}),
];
}
jbardnz commented
I'm seeing the same issue, downgrading to 0.1.2 has bypassed the issue for now.
laraning commented
Hi,
Just released a new release, can you check?