first change
This commit is contained in:
26
Modules/PMS/app/Exports/TaskExport.php
Normal file
26
Modules/PMS/app/Exports/TaskExport.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace Modules\PMS\Exports;
|
||||
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\Request;
|
||||
use Maatwebsite\Excel\Concerns\FromView;
|
||||
use Modules\PMS\Repositories\TaskRepository;
|
||||
|
||||
class TaskExport implements FromView
|
||||
{
|
||||
|
||||
protected $request;
|
||||
|
||||
public function __construct(Request $request)
|
||||
{
|
||||
$this->request = $request;
|
||||
}
|
||||
public function view(): View
|
||||
{
|
||||
$filters = $this->request;
|
||||
$tasks = (new TaskRepository())->findAll($filters);
|
||||
return view('pms::export.tasks', [
|
||||
'tasks' => $tasks,
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user