Пример #1
0
 public function index()
 {
     $page = Page::find(1);
     $menuItems = Page::where('parent_id', 0)->get();
     $news = News::with('user')->orderBy('created_at', 'desc')->first();
     return View::make('front.pages.index')->with(['page' => $page, 'news' => $news, 'menuitems' => $menuItems]);
 }
 public function showSinglePressItem($slug, $id)
 {
     $pressItem = News::with('catalog')->find($id);
     if (!$pressItem || !$pressItem->isActive() || $pressItem->getSlug() != $slug) {
         App::abort(404);
     }
     $previousPressItemId = News::active()->where('id', '<', $pressItem->id)->max('id');
     $previousPressItem = News::find($previousPressItemId);
     $nextPressItemId = News::active()->where('id', '>', $pressItem->id)->min('id');
     $nextPressItem = News::find($nextPressItemId);
     return View::make('about.press.single', compact('pressItem', 'previousPressItem', 'nextPressItem'));
 }
Пример #3
0
 public function index()
 {
     $page = Page::find(1);
     $news = News::with('user')->orderBy('created_at', 'desc')->first();
     return View::make('front.pages.index')->with(['page' => $page, 'news' => $news]);
 }
Пример #4
0
<?
/**
 * TITLE: Новости
 * AVAILABLE_ONLY_IN_ADVANCED_MODE
 */
?>
<?php 
$news_list = News::with('meta.seo', 'meta.photo', 'meta.gallery.photos')->orderBy('published_at', 'DESC')->paginate(6);
?>
@extends(Helper::layout())
@section('style')
@stop
@section('content')
    <div class="half-page">
        <div class="page-full">
            <div class="wrapper">
                <div class="tabs-title">
                    <h1 class="us-title title-yellow"><span>{{ $page->seo->h1 }}</span></h1>
                    @include(Helper::layout('about-menu'),array('hidden'=>'news'))
                </div>
            </div>
            <div class="us-news">
                <ul class="news__list martop40">
                    @foreach($news_list as $news)
                        <li class="list__item">
                            <div class="wrapper">
                                <div class="page__left">
                                    <h2 class="item__link">
                                        {{ $news->meta->title }}
                                    </h2>
                                    <div class="item__date">