Hi, my name is David Carr and I'm a PHP Developer.


Blog Archives Categories Authors About Me Open Source Books Contact Me

Sponsor Me

Help support the blog so that I can continue creating new content!

My Latest Book

Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Input

Create an input with a name, the name will be used as the label as long as the label is not provided.

<x-form.input name='username'></x-form.input>

Outputs:

<div>
    <label for='username'>Username</label>
    <input type='text' name='username' id='username' value=''>
</div> 

Use a label

<x-form.input name='username' label='Username'></x-form.input>

Use an id and a class

<x-form.input name='username' label='Username' id='username' class='form-input'></x-form.input>

The type is set to test by default, it can be changed

<x-form.input name='password' type='password'></x-form.input>

Set the input value

<x-form.input name='username' label='Username'>{{ $username }}</x-form.input>

 

Copyright © 2009 - 2022 David Carr. All code MIT license. All rights reserved.