public function getBrowser()
 {
     if (!Auth::check()) {
         return redirect("user/auth/login?redirect_to=" . url("browser"));
     }
     //Obtiene las 30 ultimas produccion agregadas
     $productions = DB::select("SELECT productions.id FROM chapters,productions WHERE chapters.production_id=productions.id and productions.state='" . Production::STATE_ACTIVE . "' GROUP BY chapters.production_id ORDER BY chapters.id DESC LIMIT 0,30 ");
     $categories = Term::orderBy(Term::ATTR_MOTE, "ASC")->get();
     return view("frontend/contents/gen/browser")->with("productions", $productions)->with("categories", $categories);
 }
示例#2
0
<?php

use App\System\Models\Term;
use App\System\Library\Detection\MobileDetect;
use App\System\Models\User;
$detect = new MobileDetect();
$categories = Term::orderBy(Term::ATTR_NAME, "ASC")->get();
?>
<nav class="navbar navbar-inverse" id="navbar">
    <div class="navbar-header">
        <a class="navbar-brand" href="{{URL::to("")}}">
            <img class="img-rounded" id="logo" src="{{URL::to("assets/images/logo.png")}}">
        </a>
    </div>
    <div id="nav-info" class="collapse navbar-collapse">
        @if(Auth::check() && !$detect->isMobile() && !$detect->isTablet())
        <ul class="nav navbar-nav" id="explore-menu">
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Explorar <span class="caret"></span></a>
                <ul class="dropdown-menu">
                    @foreach($categories as $category)
                    <li><a href="{{URL::to("category/".$category->slug)}}"><span class="glyphicon glyphicon-film"></span> {{ucfirst($category->mote)}}</a></li>
                    @endforeach
                </ul>
            </li>
        </ul>
        @endif
        <ul class="nav navbar-nav navbar-right" id="bar-user">
            @if(Auth::check())

            @if(!$detect->isMobile() && !$detect->isTablet())