@extends('layouts.site') @section('title','Strona Startowa') @section('navbar') SYG - Sygnalista @php /* Pobieram obszary aktywne dla danej instytucji */ $obszary = DB::connection('mysql-2')->table('zs001_obszary') ->where('id', '=', 12) ->first(); @endphp
@endsection @section('menu') @include('sites.syg.menu_syg') @endsection @section('content') @php $now = \Carbon\Carbon::now(); /* Sygnalista - statystyki 7 dni */ $stat_7_zagrozone = DB::table('v080_sygnalista_zgloszenia_status1_7dni') ->where('plus_4_dni','<=',$now) ->where('plus_7_dni','>=',$now) ->count(); $stat_7_pozostale = DB::table('v080_sygnalista_zgloszenia_status1_7dni') ->where('plus_4_dni','>',$now) ->count(); $stat_7_wszystkie = DB::table('t080_sygnalista_zgloszenia') ->where('status','=',1) ->count(); /* Sygnalista - statystyki 90 dni */ $stat_90_zagrozone = DB::table('v080_sygnalista_zgloszenia_status2_90dni') ->where('status','>',1) ->where('status','<',7) ->where('plus_83_dni','<=',$now) ->where('plus_90_dni','>=',$now) ->count(); $stat_90_pozostale = DB::table('v080_sygnalista_zgloszenia_status2_90dni') ->where('status','>',1) ->where('status','<',7) ->where('plus_83_dni','>',$now) ->count(); $stat_90_wszystkie = DB::table('t080_sygnalista_zgloszenia') ->where('status','>',1) ->where('status','<',7) ->count(); /* Sygnalista - Zgłoszenia */ $zgloszenia_dodane = DB::table('t080_sygnalista_zgloszenia') ->where('status','<',7) ->count(); $zgloszenia_zakonczone = DB::table('t080_sygnalista_zgloszenia') ->where('status','=',7) ->count(); $zgloszenia_wszystkie = DB::table('t080_sygnalista_zgloszenia') ->count(); @endphp
@endsection