php - How to put a value in a checkbox using Laravel? -


What I'm trying to accomplish is something like this:

  & lt; Php if (session :: is ('vaccine')) {$ tk = session :: mill ('vaccine'); } And {$ tk = 1; } If (Session is :: ('NTK')) {$ ntk = Session :: Mill ('NTK'); } And {$ ntk = 0; }? & Gt; {{Form :: open (array ('url' = & gt; 'envulen'))}} < Table & gt; & Lt; TR & gt; & Lt; TD & gt; {{Form: submit ('toepassen')}} & lt; / Td> & Lt; TD & gt; {{Form :: checkbox ('tzdcrktic', & lt ;? php $ tk? & Gt; true)}} tectructic (vaccine) & lt; Br> {{Form :: checkbox ('nitizidricit', & lt ;? php $ ntk? & Gt; false)}} neat-tjdctitich (NTK) & lt; Td> & Lt; / TR & gt; & Lt; / Table & gt; {{Form :: Closing ()}}   

In any way, it does not work in my Form :: Checkbox, so my question is how can I complete it?

Whatever I tried was:

  Session :: Mill ('vaccine', 1); Session :: Mill ('NTK', 0);   

In this way I do not need it because it returns a default value

In your code, the following:

  {{form :: checkbox ('tijdkritisch', & lt ;? php $ tk?>, true)}} translitatively ( Vaccine) & lt; Br> The {{form :: checkbox ('knitjudichit', & lt ;? php $ ntk? & Gt; false}}} Neat-textscritic (NTK)   

should be changed to:

  {{form :: checkbox ('tzdcrktic', $ vaccines, true)}} diagnostic (vaccine) & lt; Br> <{Form :: checkbox ('niettijdkritisch', $ ntk, false)}} Neut-tectructich (NTK)   

& lt ;? Php? & Gt; from {{}} , you can also type the code like this:

  $ tk = session :: is ('vaccine') ? Session :: Mill ('vaccine'): 1; $ Ntk = session :: is ('NTK')? Session :: Mill ('NTK'): 0;   

Or like it (think you know about it anyway):

  $ tk = session :: find ('vaccine) ', 1); $ Ntk = Session :: Mill ('NTK', 0);    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -