public function index()
 {
     $sections = $this->listSection();
     View::share('pageTitle', 'Configurações');
     Breadcrumbs::addCrumb('Configurações', URL::route("admin.configuration.index"));
     return View::make('configuration::admin.configuration.index', compact('sections'));
 }
Пример #2
0
 /**
  * Show the page
  *
  * @return Response
  */
 public function show($slug)
 {
     $page = Page::where('slug', '=', $slug)->firstOrFail();
     $pageTitle = $page->title;
     $pageDescription = $page->description;
     $pageKeywords = $page->keywords;
     Breadcrumbs::addCrumb($page->title, $page->url);
     return View::make('page::page.show', compact('page', 'pageTitle', 'pageDescription', 'pageKeywords'));
 }
Пример #3
0
 public function __construct()
 {
     parent::__construct();
     if (Input::get('category')) {
         $this->category = ProductCategory::find((int) Input::get('category'));
     }
     $title = 'Produtos' . ($this->category ? ': ' . $this->category->name : '');
     View::share('pageTitle', $title);
     Breadcrumbs::addCrumb($title, route("admin.product.index"));
 }
Пример #4
0
 public function __construct()
 {
     Config::set('site.theme', null);
     $this->makeMenu();
     View::share('pageTitle', '');
     Breadcrumbs::removeAll();
     Breadcrumbs::setCssClasses('breadcrumb');
     Breadcrumbs::setDivider('');
     Breadcrumbs::addCrumb('Visão Geral', URL::to('admin'));
 }
Пример #5
0
 public function show($slug)
 {
     $product = Product::where('slug', '=', $slug)->with('images')->with('attributes')->firstOrFail();
     View::share('pageTitle', $product->name);
     if ($product->description) {
         View::share('pageDescription', $product->description);
     }
     Breadcrumbs::addCrumb($product->category->name, $product->category->url);
     Breadcrumbs::addCrumb($product->name, $product->url);
     $openGraphAttributes = ['og:type' => 'product', 'og:image' => $product->mainImage->imageUrl, 'og:url' => $product->url, 'product:price:amount' => $product->price, 'product:price:currency' => 'BRL', 'product:category' => $product->category->name];
     return View::make('product::product.show', compact('product', 'openGraphAttributes'));
 }
Пример #6
0
 public function index()
 {
     View::share('pageTitle', 'Backup');
     Breadcrumbs::addCrumb('Backup', URL::route("admin.backup.index"));
     $storageService = App::make('Tee\\Backup\\Services\\StorageService');
     try {
         $listFiles = $storageService->listFiles();
     } catch (\Exception $e) {
         View::share('errorMessage', 'Houve um erro ao listar os arquivos: ' . $e->getMessage());
         $listFiles = array();
     }
     return View::make('backup::admin.index', array('listBackup' => $listFiles));
 }
Пример #7
0
 public function confirm()
 {
     Breadcrumbs::addCrumb('Confimar email', Request::fullUrl());
     $user = User::find(Input::get('user'));
     $key = Input::get('key');
     $error = $success = null;
     if ($user->confirm_key == $key) {
         $user->email_confirmed = 1;
         $user->save();
         $success = 'Email confirmado com sucesso!';
     } else {
         $error = 'Não foi possível confirmar o seu email';
     }
     return View::make('user_panel::front.register.confirm', compact('success', 'error'));
 }
Пример #8
0
 public function __construct()
 {
     if (Config::get('site.theme')) {
         Theme::init(Config::get('site.theme'));
     }
     $app = app();
     $viewFinder = $app['view.finder'];
     Breadcrumbs::setListElement('ol');
     Breadcrumbs::setCssClasses('breadcrumb');
     Breadcrumbs::addCrumb('Início', URL::to('/'));
     Breadcrumbs::setDivider('');
     View::share('breadcrumbVisible', true);
     foreach ($app['modules']->modules() as $name => $module) {
         if ($module->enabled()) {
             foreach ($viewFinder->getPaths() as $path) {
                 $viewFinder->prependNamespace($name, $path . '/modules/' . $name);
             }
         }
     }
 }
Пример #9
0
 public function __construct()
 {
     parent::__construct();
     foreach (['resourceTitle', 'resourceName', 'modelClass', 'moduleName'] as $required) {
         if (empty($this->{$required})) {
             throw new Exception("'{$required}' is an required attribute of resource controller");
         }
     }
     $class = get_class($this);
     $auxClass = explode('\\', $class);
     if (!$this->moduleName) {
         $this->moduleName = strtolower($auxClass[1]);
     }
     if (!$this->controllerRealName) {
         $this->controllerRealName = $auxClass[count($auxClass) - 1];
         $this->controllerRealName = str_replace('Controller', '', $this->controllerRealName);
         $this->controllerName = strtolower($this->controllerRealName);
         for ($i = count($auxClass) - 2; $i > 1; $i--) {
             $v = $auxClass[$i];
             if (stristr($v, 'controller')) {
                 break;
             }
             $this->controllerNamespace[] = strtolower($v);
         }
     }
     if ($this->parentResourceName) {
         $this->routePrefix = "admin.{$this->parentResourceName}.{$this->resourceName}";
     } else {
         $this->routePrefix = "admin.{$this->resourceName}";
     }
     View::share('pageTitle', str_plural($this->resourceTitle));
     View::share('resourceTitle', $this->resourceTitle);
     View::share('resourceName', $this->resourceName);
     View::share('routePrefix', $this->routePrefix);
     View::share('moduleName', $this->moduleName);
     View::share('controllerName', $this->controllerName);
     View::share('controllerRealName', $this->controllerRealName);
     View::share('tableColumns', $this->getColumns());
     View::share('orderable', $this->orderable);
     Breadcrumbs::addCrumb(str_plural($this->resourceTitle), URL::route($this->routePrefix . ".index", $this->getDefaultRouteParameters()));
 }
Пример #10
0
 public function __construct()
 {
     Breadcrumbs::addCrumb('Galerias', route("admin.gallery.index"));
     parent::__construct();
 }
Пример #11
0
 public function signin()
 {
     Breadcrumbs::addCrumb('Entrar', Request::fullUrl());
     $signinForm = new SigninForm(['data' => Input::all(), 'prefix' => 'signin']);
     return View::make('user_panel::front.userpanel.signin', compact('signinForm'));
 }