Unauthorized json php error

Asked

Viewed 22 times

0

inserir a descrição da imagem aqui

I’m hoping that when selecting a municipality the regional automatically select but this error is making me break Muringa. Can someone help me? The route is correct I’ve checked several times.

below the controller

public function getCadastro(Request $request)
{
    $v['title'] = 'Cadastro de Escola';
    $v['redes'] = Rede::lists('nome', 'id');
    $v['municipios'] = Municipio::lists('nome','id');
    $v['regionais'] = Regional::lists('nome', 'id');


   return view('auth.cadastro', $v);

}

and this the Lade

{!! Form::open(['method'=>'GET','route'=>'auth.cadastro']) !!}
  <div class="col-sm-4">
    {!! Form::label('municipio', 'Municipio:') !!}
            {!! Form::select('municipio_id',$municipios,null,['class'=>'form-control ']) !!}
            {!! $errors->first('municipio', '<span class="text-danger">:message</span> ') !!}
  </div>

  <div class="col-sm-4">
    {!! Form::label('regional', 'Regional:') !!}
            {!! Form::select('regional_id',$regionais,null,['class'=>'form-control ']) !!}
            {!! $errors->first('regional', '<span class="text-danger">:message</span> ') !!}
  </div>
{!! Form::close() !!}
  • And what is the Laravel application running? It requires authentication to access the requested resource?

  • no loguin is necessary.

  • public Function getCadastro(Request $request) { $v['title'] = 'School Registration'; $v['networks'] = Network::lists('name', 'id'); $v['municipalities'] = Municipality:::lists('name','id'); $v['regional'] = Regional::lists('name', 'id'); Return('auth.registration', $v); } This is the controller

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.