You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
1 year ago
|
<?php
|
||
|
|
||
12 months ago
|
namespace App\Http\Controllers\Report;
|
||
1 year ago
|
|
||
|
use App\Models\Peti;
|
||
12 months ago
|
use App\Models\asset_status;
|
||
1 year ago
|
use Illuminate\Http\Request;
|
||
12 months ago
|
use App\Http\Controllers\Controller;
|
||
1 year ago
|
use Maatwebsite\Excel\Facades\Excel;
|
||
|
use App\Exports\PetternLotPetiExport;
|
||
|
|
||
|
class PetternLotPetiController extends Controller
|
||
|
{
|
||
|
public function index()
|
||
|
{
|
||
|
$data = [
|
||
12 months ago
|
'peti' => Peti::withTrashed()->get(),
|
||
1 year ago
|
'active' => 'menu-Pettern_Lot_Peti'
|
||
|
];
|
||
12 months ago
|
return view('dashboard.Master_Data.Report.Pattern_lot_peti.index', $data);
|
||
1 year ago
|
}
|
||
|
|
||
12 months ago
|
public function show($id)
|
||
|
{
|
||
12 months ago
|
// dd('test');
|
||
12 months ago
|
$data = [
|
||
|
'peti' => Peti::find($id),
|
||
|
'assetStatus' => asset_status::where('peti_id', $id)->get(),
|
||
|
'active' => 'menu-Pettern_Lot_Peti'
|
||
|
];
|
||
12 months ago
|
return view('dashboard.Master_Data.Report.Pattern_lot_peti.detail_peti', $data);
|
||
12 months ago
|
}
|
||
|
|
||
1 year ago
|
public function export()
|
||
|
{
|
||
12 months ago
|
// dd('test');
|
||
|
return Excel::download(new PetternLotPetiExport, 'PATTERN_LOT_PETI.xlsx');
|
||
1 year ago
|
}
|
||
|
}
|