Siopas Inventory PETI for ISTW Website
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.

86 lines
1.9 KiB

<?php
namespace App\Http\Controllers;
use App\Models\m_warehouse;
use App\Models\Peti;
use App\Models\Transfer;
use Illuminate\Http\Request;
class TransferController extends Controller
{
public function index()
{
$data = [
'peminjaman' => Transfer::all(),
'active' => 'menu-transfer',
];
return view('dashboard.Transfer.index', $data);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
$data = [
'peti' => Peti::get(),
// 'warehouse' => Peti::with('warehouse_id')->get(),
'warehouse' => m_warehouse::get(),
'active' => 'menu-transfer',
];
return view('dashboard.Transfer.create', $data);
}
/**
* Store a newly created resource in storage.
*/
public function store($request)
{
}
/**
* Display the specified resource.
*/
public function show($id)
{
$data = [
'active' => 'menu-transfer',
];
return view('dashboard.Transfer.show', $data);
}
/**
* Show the form for editing the specified resource.
*/
public function edit($id)
{
$data = [
'active' => 'menu-transfer',
];
return view('dashboard.Transfer.edit', $data);
}
/**
* Update the specified resource in storage.
*/
public function update($request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
{
// try {
// $typepeti = Peti::findOrFail($id);
// $typepeti->delete();
// return redirect()->back()->with('success', 'Data peti berhasil dihapus');
// } catch (\Throwable $th) {
// return redirect()->back()->with('error', 'Data peti gagal dihapus');
// }
}
}