Esempio n. 1
0
 private function edit2($id)
 {
     $barang = BarangModel::all();
     $data = [];
     foreach ($barang as $value) {
         $data[$value->id] = $value->nama_barang;
     }
     return $data;
 }
Esempio n. 2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $barang = BarangModel::all();
     return View::make('layouts.barang')->with('barang', $barang);
 }