public static function boot() { static $booted; if ($booted) { return; } $booted = true; Cart::boot(); if (Admin::enable()) { AdminUI::menu('navbar')->add('shop', 'Магазин')->icon('shopping-cart'); } if (Admin::currentMode() == 'admin') { static::bootBackend(); } else { // static::bootFrontend(); } }
public function getIndex() { return $this->view('cart/cart')->with('products', Cart::content()); }