Why change all variables.
how to avoid my variables do not change its value
In my controller
public function show()
{
$inicio = Carbon::createFromFormat('Y-m-d H:i:s',"2016-02-04 11:00:00");
$fin = $inicio;
$otro = $fin->addHours(1);
return view('horas',array('inicio'=>$inicio,'otro'=>$otro,'fin'=>$fin));
}
My views:
<p><b>Inicio: </b> {{$inicio}}</p>
<p><b>Fin: </b> {{$fin}}</p>
<p><b>Otro: </b> {{$otro}}</p>
The result
Where is the problem?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/23Ln8Db
via IFTTT
Aucun commentaire:
Enregistrer un commentaire