PHP code example of anourvalar / laravel-form

1. Go to this page and download the library: Download anourvalar/laravel-form library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

anourvalar / laravel-form example snippets


<x-input type="text" name="foo" value="some text" />

<x-input type="checkbox" name="foo" value="1" :checked="$isChecked" />

<x-input type="radio" name="foo" value="1" checked-value="2" />
<x-input type="radio" name="foo" value="2" checked-value="2" /> <!-- will be checked -->
<x-input type="radio" name="foo" value="3" checked-value="2" />

<x-select name="foo" :options="[1 => ['title' => 'One'], 2 => ['title' => 'Two']]" selected="2" />

<x-textarea name="foo">Text</x-textarea>