03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Access Control List 45<br />

32 $value = Input::old($name, $options["value"]);<br />

33 }<br />

34<br />

35 $placeholder = "";<br />

36<br />

37 if (!empty($options["placeholder"]))<br />

38 {<br />

39 $placeholder = $options["placeholder"];<br />

40 }<br />

41<br />

42 $class = "";<br />

43<br />

44 if (!empty($options["class"]))<br />

45 {<br />

46 $class = " " . $options["class"];<br />

47 }<br />

48<br />

49 $parameters = [<br />

50 "class" => "form-control" . $class,<br />

51 "placeholder" => $placeholder<br />

52 ];<br />

53<br />

54 $error = "";<br />

55<br />

56 if (!empty($options["form"]))<br />

57 {<br />

58 $error = $options["form"]->getError($name);<br />

59 }<br />

60<br />

61 if ($type !== "hidden")<br />

62 {<br />

63 $markup .= "";<br />

66 }<br />

67<br />

68 switch ($type)<br />

69 {<br />

70 case "text":<br />

71 {<br />

72 $markup .= Form::label($name, $label, [<br />

73 "class" => "control-label"

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!