/** * @return array */ public static function getLootListForSelect() { $loots = Loot::all(array('id', 'item_lvl', 'slot', 'name'))->toArray(); $selectLoots = array(0 => 'Please Select'); foreach ($loots as $loot) { $selectLoots[$loot['id']] = $loot['name'] . ' (' . $loot['item_lvl'] . ' ' . $loot['slot'] . ')'; } return $selectLoots; }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $loot = Loot::all(); return view('loot.index', compact('loot')); }