public function run() { DB::table('t_powerful')->delete(); $data = array('HTML 5', 'CSS3', 'Custom Typography', 'Responsive Design', 'Custom Fonts'); $desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s"; foreach ($data as $item) { Powerful::create(['name' => $item, 'icon' => 'public/images/icon.png', 'description' => $desc]); } }
/** * Remove the specified powerful from storage. * * @param int $id * @return Response */ public function destroy($id) { Powerful::destroy($id); return Redirect::route('admin.powerful.index')->withErrors('Item had deleted!'); }
/** * Show the form for editing the specified theme. * * @param int $id * @return Response */ public function edit($id) { $data['theme'] = Theme::find($id); $data['category'] = Category::getAll(); $data['powerful'] = Powerful::getAll(); $data['theme_images'] = Theme::find($id)->themeImage; $data['theme_logs'] = Theme::find($id)->themeLog; return View::make('themes.edit', $data); }
/** * Get list powerful from a id * @var array() * @return array() */ public static function getList($arg) { $id = json_decode($arg); $data = Powerful::whereIn('id', $id)->get(); return $data; }