Problems with paginate (), do not load all lists in laravel 5.5

Posted 5 months ago by daniel21gt

I have a problem with the page, since in my case it shows two pages, the first one loads well, but when I click on page 2 it throws me an error 405, which could be wrong in my method?

public function bestado(Request $request) {

    $registrado = \Auth::user()->tipos_usuarios_id;
    $filtro = \Auth::user()->username;

    if($registrado == 1)

    { 
        $request->user()->authorizeRoles(['admin']);
        $valorestado = $request->valorestado;
        $consultarea=usuarios::where('estado', $valorestado)->paginate(6);
        $consultarea->appends(['valorestado'=>$valorestado]);
        $usuariosOpciones=usuarios::pluck('usuario_ad', 'user_id')->unique();
        $conteo=usuarios::where('estado', $valorestado)->count();
        return view('usuario.consultareas')->with(["consultarea" => $consultarea, "usuariosOpciones" => $usuariosOpciones, "conteo" => $conteo]);
       
    }

}

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.