/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $authuser = Auth::user();
     //$listaDePost = Proveedor::paginate(15);
     $Banners = Banner::orderBy('seccion', 'asc')->paginate(10);
     return View::make('administracion.pages.banners.index')->with(array('Banners' => $Banners, 'usuarioimg' => $authuser->imagen, 'usuarionombre' => $authuser->nombre, 'usuarioid' => $authuser->id));
 }
예제 #2
0
 public function index()
 {
     // latest / fresh
     $data['page'] = '';
     $data['video'] = Featuredvideo::find(1);
     $data['banners'] = Banner::orderBy('id')->get();
     $data['freshpost'] = Post::orderBy('created_at', 'desc')->take(5)->get();
     $data['featuredpost'] = FeaturedPost::orderBy('id', 'desc')->take(10)->with('post')->get();
     $data['trendingpost'] = Post::select('posts.*', DB::raw('count(votes.id) as total'))->leftJoin('votes', 'posts.id', '=', 'votes.post_id')->groupBy('posts.id')->orderBy('total', 'desc')->take(6)->get();
     return View::make('main2')->with($data);
 }
예제 #3
0
파일: header.blade.php 프로젝트: ndmson/QLM
 <?php 
/**
 * Created by qlm label makers Developer ndmson.
 * User: ndmson
 * Date: 14/10/2015
 * Time: 12:21 PM
 */
$_banners = Banner::orderBy('banner_order', 'asc')->get();
$_i = 0;
$_y = 0;
?>
 <header>
 <!-- ******************************************************************** -->
 <!-- img carousel -->
 <div class="carousel slide carousel-fade" data-ride="carousel" id="qlm-img-carousel">
     <div class="carousel-inner">
         @foreach($_banners as $_banner)
             <div class="item @if($_i==0) {{'active'}} @endif">
                 <img data-original="asserts/images/Banner/{{$_banner->banner_images}}" class="img-responsive lazy">
             </div>
         <?php 
$_i++;
?>
         @endforeach
         <!-- ******************************************************************** -->
    </div>
 </div>
     <!-- Box Overlay -->
     <div class="carousel-caption-modified">
         <!-- text carousel -->
         <div class="carousel slide" data-ride="carousel" id="text-img-carousel">
예제 #4
0
 public function index()
 {
     $data['page'] = 'me';
     $data['banners'] = Banner::orderBy('id')->get();
     return View::make('admin.banners')->with($data);
 }