I need, from a view-blade, to search a database in order to fetch data and display them in another view-blade when a link is clicked.
I made the following:
In the view-blade who will acting on database:
@foreach($pending as $p)
<tr>
<td>
<a href="">Click here</a>
</td>
</tr>
@endforeach
the connected 'route' is
Route::get("/getMyForm/{ident}", ['as' => "openMyPage", 'uses' => "BusinessController@seeMyForm"]);
the method on BusinessController has
public function seeMyForm($ident){
$myResult=DB::select(...);
return view('MyViewBlade')->with('myResult', $myResult);
}
the master template (PrincipalView.blade.php) (as was included in the view-blade to display
<!DOCTYPE html>
<html>
<head>
<meta name="csrf_token" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="assets/css/bootstrap-datepicker.min.css" rel="stylesheet">
<!-- <link rel="stylesheet" href="assets/js/jquery-ui/jquery-ui.css"> -->
<script src="assets/js/jquery.js"></script>
<!-- <script type="text/javascript" src="http://ift.tt/1JDUibz"></script> -->
<script src="assets/js/bootstrap-datepicker.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<link href="http://ift.tt/2aDsFEU" rel="stylesheet">
<script src="http://ift.tt/2aDrLs2"></script>
<script src="assets/js/jquery-ui-1.11.4.custom/jquery-ui.js"></script>
<link rel="stylesheet" href="assets/js/jquery-ui-1.11.4.custom/jquery-ui.css">
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="assets/js/jquery-pessoal.js"></script>
<script src="assets/js/jquery-pessoal2.js"></script>
<link rel="stylesheet" href="assets/plugins/multiple-select-master/multiple-select.css"></script>
<script src="assets/plugins/multiple-select-master/multiple-select.js"></script>
<link href="assets/css/custom.css" rel="stylesheet">
</head>
...
<div class="container">
@yield("corpo")
</div>
...
the view-blade which will display (ToAproveView.blade.php)
@extends('PrincipalView')
@section('corpo')
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>Cliente Principal: </label><br>
<input type="text" id="idTxtFaturamentoAprovacaoCliente"
name="namTxtFaturamentoAprovacaoCliente"
readonly value=""/>
</div>
</div>
is not working. The last view-blade do not render its elements. The view opens itself not well formatted.
Other actions make all other views-blade ok.
I found out, the problem is connected with the line code
<a href="">Click here</a>
because it was created on the fly (I guess).
Looking at the console of Chrome, is there
GET http://ift.tt/2bUSjX1
29638_1472048778961_121:16 GET http://ift.tt/2bD0RnE
29638_1472048778961_121:18 GET http://ift.tt/2bURmhs
29638_1472048778961_121:13 GET http://ift.tt/2bD2dio
29638_1472048778961_121:22 GET http://ift.tt/2bUTSUK
29638_1472048778961_121:28 GET http://ift.tt/2bD2stK
net::ERR_CONNECTION_RESET
29638_1472048778961_121:29 GET http://ift.tt/2bURpdg
net::ERR_CONNECTION_RESET
29638_1472048778961_121:23 GET http://ift.tt/2bD2x0x
net::ERR_CONNECTION_RESET
The including css and js files do not work (the names in the path are different of that I was wrote abore because I made a translation to better comprehension)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire