Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.15 KB | None | 0 0
  1.   public function DataTablesList()
  2.     {
  3.         $ponto = PontoModel::select(['id', 'servidor_id', 'data', 'horainicio', 'horafim', 'intervaloinicio', 'intervalofim'])
  4.             ->orderByDesc('id')->where('servidor_id', Auth::user()->servidor_id);
  5.            
  6.  
  7.  
  8.  
  9.             return Datatables::of($ponto)
  10.                 ->addColumn('action', function ($row) {
  11.                     $servidor = $this->servidor->find(19)->horarios()->get();
  12.                     $Pontos = $this->ponto->where('usuario_id', Auth::user()->id)->get();
  13.                        foreach ($servidor as $obj) {
  14.             foreach ($Pontos as $objPonto) {
  15.  
  16.                 $diffHoras = (strtotime($objPonto->horainicio) - strtotime($obj->inicio));
  17.                 $convert = gmdate("H:i:s", $diffHoras);
  18.                 $teste = gmdate("H:i:s", 900);
  19.  
  20.             }
  21.         }
  22.  
  23.                     if($row->horainicio > $obj->inicio)
  24.                     return '
  25.  
  26.  
  27.            <a href="' . Route('justificativa.create', $row->id) . '">
  28.  
  29.            <span class="material-icons">trending_up</span></a>';
  30.                 })
  31.                 ->make(true);
  32.  
  33.  
  34.        
  35.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement