Commit a17ddf8b by Yonatan Parapat

no message

parents eccf56bc 4b6195aa
...@@ -8,6 +8,15 @@ use App\Http\Requests; ...@@ -8,6 +8,15 @@ use App\Http\Requests;
use App\Barang; use App\Barang;
<<<<<<< HEAD
=======
use App\RequestBarang;
use App\DataRequest;
use App\Pembelian;
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65
use App\RequestBarang; use App\RequestBarang;
use App\DataRequest; use App\DataRequest;
...@@ -91,8 +100,22 @@ class InventoriController extends Controller ...@@ -91,8 +100,22 @@ class InventoriController extends Controller
} }
<<<<<<< HEAD
//----------------------------List Request----------------------//
public function ListRequest()
{
$request_barangs = RequestBarang::all();
return view('adminlte::inventori.ListRequest.index', compact('request_barangs'));
}
public function editRequest($id)
{
=======
public function editRequest($id) public function editRequest($id)
{ {
>>>>>>> 226a4f92be2de6ce884543bf9425346660a5031f
$request_barangs = RequestBarang::where('id', $id)->first(); $request_barangs = RequestBarang::where('id', $id)->first();
return view('adminlte::inventori.ListRequest.edit')->with('request_barangs', $request_barangs); return view('adminlte::inventori.ListRequest.edit')->with('request_barangs', $request_barangs);
} }
...@@ -131,8 +154,46 @@ class InventoriController extends Controller ...@@ -131,8 +154,46 @@ class InventoriController extends Controller
$data_requests->harga = $request['harga']; $data_requests->harga = $request['harga'];
$data_requests->save(); $data_requests->save();
return redirect('DataRequest'); return redirect('DataRequest');
<<<<<<< HEAD
}
public function editDataRequest($id)
{
$data_requests = DataRequest::where('id', $id)->first();
return view('adminlte::inventori.DataRequest.editDataRequest')->with('data_requests', $data_requests);
}
public function updateDataRequest(Request $request, $id)
{
$this->validate($request, [
'nama_barang' => 'required',
'kategori' => 'required',
'harga' => 'required',
]);
$data_requests = DataRequest::findOrFail($id);
$data_requests->nama_barang = $request->nama_barang;
$data_requests->kategori = $request->kategori;
$data_requests->harga = $request->harga;
$data_requests->save();
return redirect('DataRequest');
}
public function destroyDataRequest($id)
{
$data_requests = DataRequest::find($id);
$data_requests->delete();
return redirect('DataRequest');
=======
>>>>>>> 226a4f92be2de6ce884543bf9425346660a5031f
} }
<<<<<<< HEAD
=======
public function editDataRequest($id) public function editDataRequest($id)
{ {
...@@ -166,6 +227,7 @@ class InventoriController extends Controller ...@@ -166,6 +227,7 @@ class InventoriController extends Controller
return redirect('DataRequest'); return redirect('DataRequest');
} }
>>>>>>> 4b6195aa0546e35951dd24b13bd7816e0f50cb65
public function konfirmasiBarang($id) public function konfirmasiBarang($id)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment