update addon HRM
Some checks failed
Some checks failed
This commit is contained in:
21
Modules/HrmAddon/App/Exports/ExportPayrollReport.php
Normal file
21
Modules/HrmAddon/App/Exports/ExportPayrollReport.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\HrmAddon\App\Exports;
|
||||
|
||||
use App\Models\Sale;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Modules\HrmAddon\App\Models\Payroll;
|
||||
|
||||
class ExportPayrollReport implements FromView
|
||||
{
|
||||
public function view(): View
|
||||
{
|
||||
$payrolls = Payroll::with(['employee:id,name', 'payment_type:id,name', 'branch:id,name'])
|
||||
->where('business_id', auth()->user()->business_id)
|
||||
->latest()
|
||||
->get();
|
||||
|
||||
return view('hrmaddon::reports.payrolls.excel', compact('payrolls'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user