Penambahan Menu Pagu Fakultas
This commit is contained in:
@@ -17,7 +17,7 @@ class PaguExport implements FromCollection, WithHeadings, WithMapping, WithColum
|
||||
{
|
||||
protected $periode;
|
||||
|
||||
public function __construct($periode = null)
|
||||
public function __construct($periode = null, protected ?int $facultyId = null)
|
||||
{
|
||||
$this->periode = $periode;
|
||||
}
|
||||
@@ -30,6 +30,9 @@ class PaguExport implements FromCollection, WithHeadings, WithMapping, WithColum
|
||||
public function collection()
|
||||
{
|
||||
$query = Pagu::with('unitKerja');
|
||||
if ($this->facultyId !== null) {
|
||||
$query->where('unit_pembayaran_id', $this->facultyId);
|
||||
}
|
||||
|
||||
if ($this->periode) {
|
||||
$query->where('tahun', $this->periode);
|
||||
|
||||
Reference in New Issue
Block a user