first commit
This commit is contained in:
17
app/Reports/BaseExport.php
Normal file
17
app/Reports/BaseExport.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Reports;
|
||||
|
||||
use Carbon\CarbonInterval;
|
||||
|
||||
abstract class BaseExport
|
||||
{
|
||||
protected function formatDuration(int $seconds): string
|
||||
{
|
||||
if ($seconds === 0) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return CarbonInterval::seconds($seconds)->cascade()->forHumans(['short' => true]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user