예제 #1
0
 public function getDetalle($permalink = '')
 {
     $noticia = SFNews::where('permalink', '=', $permalink)->where('status', '=', '1')->take(1)->get();
     if (isset($noticia[0])) {
         $args = array('noticia' => $noticia[0], 'route' => self::$route);
         return View::make('frontend.noticias.detail')->with($args);
     } else {
         return View::make('specialpages.404');
     }
 }
예제 #2
0
 public function getIndex()
 {
     $event = Events::where('title', '=', 'EVENTOS')->take(1)->get();
     $courses = isset($event[0]) ? $event[0]->getPublishCourses(3) : null;
     $banner = SFNews::where('sticky', '=', '0')->where('category', '=', '0')->where('status', '=', '1')->where('home', '=', '1')->orderBy('date', 'DESC')->take(3)->get();
     $principal = SFNews::where('sticky', '=', '0')->where('category', '=', '1')->where('status', '=', '1')->where('home', '=', '1')->orderBy('date', 'DESC')->take(1)->get();
     $news = SFNews::where('status', '=', '1')->where('home', '=', '1')->orderBy('date', 'DESC')->take(3)->get();
     $video = SFVideos::where('position', '=', '1')->take(1)->get();
     $video = isset($video[0]) ? $video[0] : null;
     $args = array('news' => $news, 'courses' => $courses, 'principal' => $principal, 'banner' => $banner, 'video' => $video);
     return View::make('frontend.home.index')->with($args);
 }
예제 #3
0
<style>
  ul.lof-main-wapper li {
    position:relative;  
  }
  
</style>
<!------------------------------------- THE CONTENT ------------------------------------------------->
<div id="jslidernews2" class="lof-slidecontent">
  <div class="preload"><div></div></div>
  <div  class="button-previous">Previous</div>
  
  <!-- MAIN CONTENT --> 
  <div class="main-slider-content" style="width:1000px; height:398px;">
    <ul class="sliders-wrap-inner">
    <?php 
$banner = SFNews::where('sticky', '=', '0')->where('category', '=', '0')->where('status', '=', '1')->where('home', '=', '1')->orderBy('date', 'DESC')->take(3)->get();
?>
      @if(count($banner) > 0)
        @foreach($banner as $element)
          <li>
            <a href="/noticias/detalle/{{ $element->permalink }}">
              <img title="ABGE promove Simpósio de sucesso em Cuiabá" alt="ABGE promove Simpósio de sucesso em Cuiabá" src="/uploads/news/banner_{{ $element->image }}" />              
            </a>  
          </li> 
        @endforeach
      @endif
      <!-- <li>
        <a href="/noticias/detalle/165-Abge-promove-simp-sio-de-sucesso-em-cuiab">
          <img title="ABGE promove Simpósio de sucesso em Cuiabá" alt="ABGE promove Simpósio de sucesso em Cuiabá" src="/uploads/news/banner_165_img_20150325_1545154.jpg" />              
        </a>  
      </li> 
예제 #4
0
 public function postVideos($id)
 {
     $news = SFNews::find($id);
     $news->videos()->sync(Input::get('videos'));
     return Redirect::to($this->route);
 }