Commit 2ddc75b9 authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Ajuste de paginação nas paginas de listagem de projetos

parent d7a3dc68
...@@ -92,7 +92,7 @@ class ProponenteController extends Controller ...@@ -92,7 +92,7 @@ class ProponenteController extends Controller
if($request->buscar == null){ if($request->buscar == null){
$proponente = Proponente::where('user_id', Auth()->user()->id)->first(); $proponente = Proponente::where('user_id', Auth()->user()->id)->first();
$projetos = Trabalho::where('proponente_id', $proponente->id)->get(); $projetos = Trabalho::where('proponente_id', $proponente->id)->paginate(10);
$hoje = Carbon::today('America/Recife'); $hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString(); $hoje = $hoje->toDateString();
...@@ -100,7 +100,7 @@ class ProponenteController extends Controller ...@@ -100,7 +100,7 @@ class ProponenteController extends Controller
}else{ }else{
$proponente = Proponente::where('user_id', Auth()->user()->id)->first(); $proponente = Proponente::where('user_id', Auth()->user()->id)->first();
$projetos = Trabalho::where('proponente_id','=',$proponente->id)->where('titulo','ilike','%'.$request->buscar.'%')->get(); $projetos = Trabalho::where('proponente_id','=',$proponente->id)->where('titulo','ilike','%'.$request->buscar.'%')->paginate(10);
$hoje = Carbon::today('America/Recife'); $hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString(); $hoje = $hoje->toDateString();
...@@ -111,7 +111,7 @@ class ProponenteController extends Controller ...@@ -111,7 +111,7 @@ class ProponenteController extends Controller
} }
public function projetosEdital($id) { public function projetosEdital($id) {
$edital = Evento::find($id); $edital = Evento::find($id);
$projetos = Trabalho::where('evento_id', '=', $id)->orderBy('titulo')->get(); $projetos = Trabalho::where('evento_id', '=', $id)->orderBy('titulo')->paginate(10);
$hoje = Carbon::today('America/Recife'); $hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString(); $hoje = $hoje->toDateString();
......
...@@ -191,6 +191,9 @@ ...@@ -191,6 +191,9 @@
@endif @endif
@endif @endif
</div> </div>
<div class="col-md-12" style="padding-left: 20px">
{{ $projetos->links() }}
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -199,10 +199,16 @@ ...@@ -199,10 +199,16 @@
</div> </div>
@endif @endif
</div> </div>
<div class="col-md-12" style="padding-left: 20px">
{{ $projetos->links() }}
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
@endsection @endsection
@section('javascript') @section('javascript')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment