/** * Show the form for creating a new resource. * * @return Response */ private function index1() { $price = PriceModel::all(); $data = []; foreach ($price as $item) { $data[$item->id] = $item->id_stok; } return $data; }
/** * Display a listing of the resource. * * @return Response */ public function index() { $price = PriceModel::all(); $data['price'] = $price; return View::make('layouts.price', $data); }