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.
38 lines
991 B
38 lines
991 B
<?php |
|
|
|
namespace App\Http\Controllers; |
|
|
|
use App\Models\Peti; |
|
use Illuminate\Http\Request; |
|
use Maatwebsite\Excel\Facades\Excel; |
|
use App\Exports\PetternLotPetiExport; |
|
use App\Models\asset_status; |
|
|
|
class PetternLotPetiController extends Controller |
|
{ |
|
public function index() |
|
{ |
|
$data = [ |
|
'peti' => Peti::withTrashed()->get(), |
|
'active' => 'menu-Pettern_Lot_Peti' |
|
]; |
|
return view('dashboard.Master_Data.Report.Pattern_lot_peti.index', $data); |
|
} |
|
|
|
public function show($id) |
|
{ |
|
// dd('test'); |
|
$data = [ |
|
'peti' => Peti::find($id), |
|
'assetStatus' => asset_status::where('peti_id', $id)->get(), |
|
'active' => 'menu-Pettern_Lot_Peti' |
|
]; |
|
return view('dashboard.Master_Data.Report.Pattern_lot_peti.detail_peti', $data); |
|
} |
|
|
|
public function export() |
|
{ |
|
// dd('test'); |
|
return Excel::download(new PetternLotPetiExport, 'PATTERN_LOT_PETI.xlsx'); |
|
} |
|
}
|
|
|