-
-
Save ingliths/121718f83b7e08f4d04bacc9714df8ff to your computer and use it in GitHub Desktop.
Ponto/php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function search(){ | |
| $dirId=Diretoria::find(Auth::user()->diretoria); | |
| if(input::get('dadosMatricula')== false){ | |
| $dirId=Diretoria::find(Auth::user()->diretoria); | |
| return view('relatorio_ponto',compact('dirId')); | |
| } | |
| if(input::get('dadosMatricula')){ | |
| $pontos = $dirId->pontos()->where('PONTO_FUNCIONARIO','like','%'.input::get('dadosMatricula').'%') | |
| ->get(); | |
| } | |
| if(input::get('dadosMatricula') == true && input::get('dadosEntrada')== true){ | |
| $data1 = input::get('dadosEntrada'); | |
| $data2 = input::get('dadosSaida'); | |
| $pontos = $dirId->pontos()->where('PONTO_FUNCIONARIO', 'like', '%' .input::get('dadosMatricula') . '%') | |
| ->whereBetween('PONTO_ENTRADA',[ $data1,$data2 ] ) | |
| ->get(); | |
| } | |
| return view('search',compact('pontos')); | |
| } |
victorhsanjos
commented
Dec 27, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment