You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
500 B
PHTML
26 lines
500 B
PHTML
5 years ago
|
<?php
|
||
|
|
||
|
namespace App\Exports;
|
||
|
|
||
|
use App\Models\Transaksi;
|
||
|
use Illuminate\Contracts\View\View;
|
||
|
use Maatwebsite\Excel\Concerns\FromView;
|
||
|
|
||
|
class SppExport implements FromView
|
||
|
{
|
||
|
/**
|
||
|
* @return \Illuminate\Support\Collection
|
||
|
*/
|
||
|
public function collection()
|
||
|
{
|
||
|
return Transaksi::orderBy('created_at','desc')->get();
|
||
|
}
|
||
|
|
||
|
public function view(): View
|
||
|
{
|
||
|
return view('transaksi.transaksiexport', [
|
||
|
'transaksi' => $this->collection(),
|
||
|
]);
|
||
|
}
|
||
|
}
|