change icons, css, add routing to merchandise, add mail templater, fixes
This commit is contained in:
45
app/Repositories/Core/Export/HelperExcel.php
Normal file
45
app/Repositories/Core/Export/HelperExcel.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories\Core\Export;
|
||||
|
||||
class HelperExcel
|
||||
{
|
||||
public static function getHeaderStyle($color = 'ffffff', $bgcolor = '00a3cb')
|
||||
{
|
||||
return [
|
||||
'fill' => self::setFill($bgcolor),
|
||||
'borders' => self::setBorders($bgcolor),
|
||||
'font' => self::setFont($color, 14, true),
|
||||
];
|
||||
}
|
||||
|
||||
public static function setFill($color)
|
||||
{
|
||||
return [
|
||||
'fillType' => \PhpOffice\PhpSpreadsheet\Style\Fill::FILL_SOLID,
|
||||
'startColor' => [
|
||||
'rgb' => $color,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public static function setBorders($color)
|
||||
{
|
||||
return [
|
||||
'outline' => [
|
||||
'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK,
|
||||
'color' => ['argb' => $color],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public static function setFont($color, $size = 12, $bold = false, $font = 'Calibri')
|
||||
{
|
||||
return [
|
||||
'name' => $font,
|
||||
'size' => $size,
|
||||
'bold' => $bold,
|
||||
'color' => ['argb' => $color],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user