mercredi 28 mars 2018

Routes on the server do not work (Laravel)

how are you?

Well, while my system was operating locally my routes worked very well. The problem started when I went to test the system on the server.

I have a form that calls a route to update the database and then it redirects to a view.

My url of the form is this way, "http://myserver/SisPrev/salvarefetivoum" after saving the data she goes to this url, "http://myserver/conjuge/addBanco", losing the /SisPrev reference.

Could anyone tell me why he does this?

My route:

Route::post('/conjuge/addBanco', 'ViewController@adicionarConjuge');

Part of my blade:

<form role="form" method='post' action='/conjuge/addBanco' autocomplete="off">

Part of my controller that returns to the view that is not being able to access:

$user = Usuario::where('nr_cpf_servidor',$cpf)->first();

if($user == null){
   return Redirect::back()->withErrors(['Não foi possível encontrar o Servidor.']);
}else{
   return view('/endereco_edit', compact('user','logradouros'));
}



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Gf5JzY
via IFTTT

Aucun commentaire:

Enregistrer un commentaire