public function suggestion() { $user_id = Auth::user()->id; $colonia = Session::get("colonia"); $urbanism = Urbanism::where('colony_id', '=', $colonia)->first(); $neighbor = Neighbors::where('user_id', '=', $user_id)->first(); $neighbors = NeighborProperty::with('Neighbors')->where('urbanism_id', '=', $urbanism->id)->where('neighbors_id', '!=', $neighbor->id)->get(); $breadcrumbs = Neighbors::where('user_id', '=', $user_id)->first(); $breadcrumbs_data = $breadcrumbs->name . " " . $breadcrumbs->last_name . " [ " . $urbanism->Colony->name . " ]"; $suggestions = DB::table('suggestions')->select('suggestions.id', 'suggestions.user_id', 'neighbors.name', 'neighbors.last_name', 'suggestions.asunto', 'suggestions.contenido', 'suggestions.id_mensaje', 'suggestions.mark', 'suggestions.created_at')->join('neighbors', 'neighbors.user_id', '=', 'suggestions.user_id')->where('id_receptor', '=', $user_id)->where('tray', '<>', 0)->orderBy('created_at', 'desc')->paginate(10); $count = Suggestion::where('id_receptor', '=', $user_id)->where('tray', '<>', 0)->where('mark', '<>', 'read')->count(); $suggestionsSent = Suggestion::where('user_id', '=', $user_id)->where('tray', '<>', 0)->get(); return View::make('dashboard.colonies.suggestions.suggestion', ['usuario' => $breadcrumbs_data, 'urbanism' => $urbanism->id, 'admin' => $neighbor->id, 'suggestions' => $suggestions, 'count' => $count, 'suggestionsSent' => $suggestionsSent, 'contador' => 1]); }
public function sugerenciasPapelera() { $user_id = Auth::user()->id; $colonia = Session::get("colonia"); $urbanism = Urbanism::where('colony_id', '=', $colonia)->first(); $neighbor = Neighbors::where('user_id', '=', $user_id)->first(); $neighbors = NeighborProperty::with('Neighbors')->where('urbanism_id', '=', $urbanism->id)->where('neighbors_id', '!=', $neighbor->id)->get(); $breadcrumbs = Neighbors::where('user_id', '=', $user_id)->first(); $breadcrumbs_data = $breadcrumbs->name . " " . $breadcrumbs->last_name . " [ " . $urbanism->Colony->name . " ]"; $suggestions = Suggestion::where('user_id', '=', $user_id)->where('tray', '=', 0)->where('bd_inbox', '=', 1)->orderBy('created_at', 'desc')->paginate(10); $count = Suggestion::where('id_receptor', '=', $user_id)->where('tray', '<>', 0)->where('bd_inbox', '=', 2)->where('mark', '<>', 'read')->count(); return View::make('dashboard.colonies.suggestions.suggestions_trash', ['usuario' => $breadcrumbs_data, 'urbanism' => $urbanism, 'admin' => $neighbor->id, 'suggestions' => $suggestions, 'count' => $count, 'contador' => 1, 'neighbor' => $neighbor]); }
<img src="{{asset('assets/index/images/templatemo_logo.png')}}" alt="logo" class="logo"> </a> <!--Navigation Itself--> <div class="navbar-content"> <!--Sidebar Toggler--> <a href="#" class="btn btn-default left-toggler" title="Panel"><i class="fa fa-bars"></i></a> <div class="btn-group" > <a href="#" class="btn btn-default " title="Sugerencias" id="modalEmail"><i class="entypo-mail"></i><!--<span class="new"></span>--></a> </div> <?php $user_id = Auth::user()->id; $suggestions = Suggestion::where('id_receptor', '=', $user_id)->where('tray', '<>', 0)->where('mark', '<>', 'read')->orderBy('created_at', 'desc')->get(); $count = Suggestion::where('id_receptor', '=', $user_id)->where('tray', '<>', 0)->where('mark', '<>', 'read')->count(); $expiration_license = LicenseExpiration::where('colony_id', '=', Session::get("colonia"))->first(); ?> <div class="btn-group"> <button type="button" title="Notificaciones" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <i class="entypo-megaphone"></i>@if($count > 0)<span class="new"></span>@endif</button> <div id="notification-dropdown" class="dropdown-menu"> <div class="dropdown-header">Notificaciones <span class="badge pull-right">{{ $count }}</span></div> <div class="dropdown-container"> <div class="nano"> <div class="nano-content"> <ul class="notification-dropdown"> @foreach($suggestions as $suggestion) <li class="bg-info"><a href="{{ URL::route('config.colony.suggestions.view',$suggestion->id_mensaje) }}"> <span class="notification-icon"><i class="fa fa-bolt"></i></span> <h4>{{ $suggestion->asunto }}</h4> <p>{{ $suggestion->contenido }}</p> <span class="label label-default"></span> </a>