diff --git a/app/Http/Controllers/PeminjamanController.php b/app/Http/Controllers/PeminjamanController.php index 149f743..1b3fd08 100644 --- a/app/Http/Controllers/PeminjamanController.php +++ b/app/Http/Controllers/PeminjamanController.php @@ -86,7 +86,7 @@ class PeminjamanController extends Controller public function edit($id) { $data = [ - 'asset' => m_asset::all(), + 'peti' => Peti::all(), 'peminjaman' => asset_status::find($id), 'warehouse' => m_warehouse::get(), 'active' => 'menu-peminjaman', @@ -100,10 +100,11 @@ class PeminjamanController extends Controller public function update(Request $request, $id) { // dd('oke'); + // dd($request->all()); $request->validate([ - 'asset_id' => 'required', + 'peti_id' => 'required', 'exit_at' => 'required', - 'exit_pic' => 'required', + 'est_pengembalian' => 'required', 'exit_warehouse' => 'required', ]); // dd($request); diff --git a/app/Http/Controllers/PengembalianController.php b/app/Http/Controllers/PengembalianController.php index a27f57a..5278758 100644 --- a/app/Http/Controllers/PengembalianController.php +++ b/app/Http/Controllers/PengembalianController.php @@ -2,9 +2,10 @@ namespace App\Http\Controllers; -use App\Models\asset_status; +use App\Models\Peti; use App\Models\m_asset; use App\Models\m_warehouse; +use App\Models\asset_status; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; @@ -13,7 +14,7 @@ class PengembalianController extends Controller public function index() { $data = [ - 'peminjaman' => asset_status::get(), + 'peminjaman' => asset_status::all(), 'active' => 'menu-pengembalian', ]; return view('dashboard.Pengembalian.index', $data); @@ -48,6 +49,7 @@ class PengembalianController extends Controller public function edit($id) { $data = [ + 'peti' => Peti::get(), 'peminjaman' => asset_status::findOrFail($id), 'warehouse' => m_warehouse::get(), 'active' => 'menu-pengembalian', diff --git a/resources/views/dashboard/Peminjaman/create.blade.php b/resources/views/dashboard/Peminjaman/create.blade.php index 298f114..25f0338 100644 --- a/resources/views/dashboard/Peminjaman/create.blade.php +++ b/resources/views/dashboard/Peminjaman/create.blade.php @@ -13,13 +13,6 @@