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
if($request->buscar == null){
$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 = $hoje->toDateString();
......@@ -100,7 +100,7 @@ class ProponenteController extends Controller
}else{
$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 = $hoje->toDateString();
......@@ -111,7 +111,7 @@ class ProponenteController extends Controller
}
public function projetosEdital($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 = $hoje->toDateString();
......
......@@ -191,6 +191,9 @@
@endif
@endif
</div>
<div class="col-md-12" style="padding-left: 20px">
{{ $projetos->links() }}
</div>
</div>
</div>
</div>
......
......@@ -199,10 +199,16 @@
</div>
@endif
</div>
<div class="col-md-12" style="padding-left: 20px">
{{ $projetos->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection
@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