public function getIndex() { $items = Menu::orderBy('order')->get(); $menu = new Menu(); $menu = $menu->getHTML($items); $this->layout->content = View::make('admin.menu.builder', array('items' => $items, 'menu' => $menu)); }
public function home() { $link_pages = OnlineOrder::orderBy('id', 'ASC')->get(); $slider_pages = Slider::orderBy('position', 'ASC')->get(); $menu_sliders = Menu::orderBy('id', 'ASC')->get(); $menu_pdf = Menupdf::orderBy('id', 'ASC')->get(); return View::make('pages.index', ['slider_pages' => $slider_pages, 'link_pages' => $link_pages, 'menu_sliders' => $menu_sliders, 'menu_pdf' => $menu_pdf]); }
public function index() { if (\Input::get('theme')) { \Cookie::queue('theme', \Input::get('theme'), 100); return Redirect::to('/')->withCookie(cookie('theme', \Input::get('theme'), 100)); } $data = array('videos' => Video::where('active', '=', '1')->orderBy('created_at', 'DESC')->simplePaginate($this->videos_per_page), 'current_page' => 1, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'pagination_url' => '/videos', 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all()); //dd($data['videos']); return View::make('Theme::home', $data); }
public function index() { $search_value = Input::get('value'); if (empty($search_value)) { return Redirect::to('/'); } $videos = Video::where('active', '=', 1)->where('title', 'LIKE', '%' . $search_value . '%')->orderBy('created_at', 'desc')->get(); $posts = Post::where('active', '=', 1)->where('title', 'LIKE', '%' . $search_value . '%')->orderBy('created_at', 'desc')->get(); $data = array('videos' => $videos, 'posts' => $posts, 'search_value' => $search_value, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all()); return View::make('Theme::search-list', $data); }
public function category($category) { $page = Input::get('page'); if (!empty($page)) { $page = Input::get('page'); } else { $page = 1; } $cat = PostCategory::where('slug', '=', $category)->first(); $data = array('posts' => Post::where('active', '=', '1')->where('post_category_id', '=', $cat->id)->orderBy('created_at', 'DESC')->simplePaginate($this->posts_per_page), 'current_page' => $page, 'category' => $cat, 'page_title' => 'Posts - ' . $cat->name, 'page_description' => 'Page ' . $page, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'pagination_url' => '/posts/category/' . $category, 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all()); return View::make('Theme::post-list', $data); }
public function store() { $input = Input::all(); $last_menu_item = Menu::orderBy('order', 'DESC')->first(); if (isset($last_menu_item->order)) { $new_menu_order = intval($last_menu_item->order) + 1; } else { $new_menu_order = 1; } $input['order'] = $new_menu_order; $menu = Menu::create($input); if (isset($menu->id)) { return Redirect::to('admin/menu')->with(array('note' => 'Successfully Added New Menu Item', 'note_type' => 'success')); } }
public function show_favorites() { if (!Auth::guest()) { $page = Input::get('page'); if (empty($page)) { $page = 1; } $favorites = Favorite::where('user_id', '=', Auth::user()->id)->orderBy('created_at', 'desc')->get(); $favorite_array = array(); foreach ($favorites as $key => $fave) { array_push($favorite_array, $fave->video_id); } $videos = Video::where('active', '=', '1')->whereIn('id', $favorite_array)->paginate(12); $data = array('videos' => $videos, 'page_title' => ucfirst(Auth::user()->username) . '\'s Favorite Videos', 'current_page' => $page, 'page_description' => 'Page ' . $page, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'pagination_url' => '/favorites', 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all()); return View::make('Theme::video-list', $data); } else { return Redirect::to('videos'); } }
public function index() { $data['data'] = Menu::orderBy('menu_id', 'desc')->paginate(9); return View::make('guest/content/customerMenu/index', $data)->with("titleTable", "Thực đơn tuần")->with("flash_success", "Đăng ký ăn thành công! Xem lịch ăn của bạn!"); }
<?php $menu = Menu::orderBy('order', 'ASC')->get(); include 'includes/header.php'; ?> <div class="container"> <h3>(404) Not found</h3> <p>Sorry, the page you are looking for does not exist.</p> <a href="<?php echo URL::to('/'); ?> ">Click here to visit the homepage</a> </div> <br /><br /> <?php include 'includes/footer.php';
function get_data() { return Menu::orderBy('sort', 'ASC')->orderBy('id', 'ASC')->where('status', 1)->where('prnt', null)->get(); }
public function index() { $menus = Menu::orderBy('order')->get(); return View::make("admin.menu.list", array("menus" => $menus)); }
public function password_reset_token($token) { $data = array('type' => 'reset_password', 'token' => $token, 'menu' => Menu::orderBy('order', 'ASC')->get(), 'payment_settings' => PaymentSetting::first(), 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all()); return View::make('Theme::auth', $data); }
public function pages() { $data = array('pages' => Page::orderBy('created_at', 'DESC')->get(), 'page_title' => 'Pages', 'page_description' => 'All Pages', 'menu' => Menu::orderBy('order', 'ASC')->get(), 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all()); return View::make('Theme::page-list', $data); }
/** * List all the online links * @return \Illuminate\View\View */ public function index() { $menu_pages = Menu::orderBy('id')->get(); $total_pages = Menu::all()->count(); return View::make('admin.menu.index', array('menu_pages' => $menu_pages, 'total' => $total_pages)); }
public function renew($username) { $user = User::where('username', '=', $username)->first(); $payment_settings = PaymentSetting::first(); if ($payment_settings->live_mode) { User::setStripeKey($payment_settings->live_secret_key); } else { User::setStripeKey($payment_settings->test_secret_key); } if (Auth::user()->username == $username) { $data = array('user' => $user, 'post_route' => URL::to('user') . '/' . $user->username . '/update', 'type' => 'renew_subscription', 'menu' => Menu::orderBy('order', 'ASC')->get(), 'payment_settings' => $payment_settings, 'video_categories' => VideoCategory::all(), 'post_categories' => PostCategory::all(), 'theme_settings' => ThemeHelper::getThemeSettings(), 'pages' => Page::all()); return View::make('Theme::user', $data); } else { return Redirect::to('/'); } }
public function index() { $this->_data['data'] = Menu::orderBy("menu_id", "desc")->paginate(10); return View::make("admin.content.menu.index", $this->_data)->with("titlePage", "Manage Menu")->with("titleTable", "Danh sách thực đơn của nhà hàng"); }