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.
84 lines
1.8 KiB
84 lines
1.8 KiB
<?php |
|
|
|
namespace App\Http\Controllers; |
|
|
|
use App\Models\Peti; |
|
use App\Models\m_warehouse; |
|
use Illuminate\Http\Request; |
|
|
|
class DisposalController extends Controller |
|
{ |
|
public function index() |
|
{ |
|
$data = [ |
|
'active' => 'menu-disposal', |
|
]; |
|
return view('dashboard.Disposal.index', $data); |
|
} |
|
|
|
|
|
/** |
|
* Show the form for creating a new resource. |
|
*/ |
|
public function create() |
|
{ |
|
$data = [ |
|
'peti' => Peti::get(), |
|
'warehouse' => m_warehouse::get(), |
|
'active' => 'menu-disposal', |
|
]; |
|
return view('dashboard.Disposal.create', $data); |
|
} |
|
|
|
/** |
|
* Store a newly created resource in storage. |
|
*/ |
|
public function store($request) |
|
{ |
|
// |
|
} |
|
|
|
/** |
|
* Display the specified resource. |
|
*/ |
|
public function show($id) |
|
{ |
|
$data = [ |
|
'active' => 'menu-disposal', |
|
]; |
|
return view('dashboard.Disposal.show', $data); |
|
} |
|
|
|
/** |
|
* Show the form for editing the specified resource. |
|
*/ |
|
public function edit($id) |
|
{ |
|
$data = [ |
|
'active' => 'menu-disposal', |
|
]; |
|
return view('dashboard.Disposal.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'); |
|
// } |
|
} |
|
}
|
|
|