public function list_product() { $this->data['css_assets'] = Assets::load('css', ['admin_bootstrap', 'admin_css', 'font-awesome', 'skins', 'dataTables_css']); $this->data['js_assets'] = Assets::load('js', ['jquery', 'admin_js', 'admin_bootstrap-js', 'slimscroll', 'fastclick', 'dataTables_js', 'dataTables_bootsjs']); $this->data['title'] = 'Product | List'; $this->data['product'] = Product::where('category_id', 1)->orderBy('created_at', 'DESC')->get(); $this->data['category'] = Category::get(); $this->data['distributor'] = Distributor::get(); return view('admin_layout')->with('data', $this->data)->nest('content', 'admin/product/list_produk', array('data' => $this->data)); }
public function create() { $this->data['css_assets'] = Assets::load('css', ['admin_bootstrap', 'admin_css', 'font-awesome', 'skins', 'ionicons']); $this->data['js_assets'] = Assets::load('js', ['jquery', 'admin_js', 'admin_bootstrap-js', 'slimscroll', 'fastclick']); $this->data['title'] = 'Product | Create'; $this->data['category'] = Category::get(); $this->data['distributor'] = Distributor::get(); $this->data['array'] = ''; return view('admin_layout')->with('data', $this->data)->nest('content', 'admin/product_insert', array('data' => $this->data)); }