PHP code example of dcblogdev / laravel-blade-components
1. Go to this page and download the library: Download dcblogdev/laravel-blade-components 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/ */
dcblogdev / laravel-blade-components example snippets
<x-form.input name='username'></x-form.input>
<x-form.input name='username' label='Username'></x-form.input>
<x-form.input name='username' label='Username' id='username' class='form-input'></x-form.input>
<x-form.input name='password' type='password'></x-form.input>
<x-form.input name='username' label='Username'>{{ $username }}</x-form.input>
<x-form.textarea name='comments'></x-form.textarea>
<x-form.textarea name='comments' cols='10' rows='10'></x-form.textarea>
<x-form.textarea name='comments' cols='10' rows='10'>{{ $comments }}</x-form.textarea>
<x-form.checkbox name='terms' value='1'></x-form.checkbox>
<x-form.checkbox name='terms' value='1'>1</x-form.checkbox>
<x-form.checkbox name='terms' value='1'>{{ $terms }}</x-form.checkbox>
<x-form.radio name='result' label='Won' value='Won'></x-form.radio>
<x-form.radio name='result' label='Lost' value='Lost'></x-form.radio>
<x-form.radio name='result' label='Draw' value='Draw'></x-form.radio>
<x-form.radio name='result' label='Won' value='Won'>{{ $result }}</x-form.radio>
<x-form.radio name='result' label='Lost' value='Lost'>{{ $result }}</x-form.radio>
<x-form.radio name='result' label='Draw' value='Draw'>{{ $result }}</x-form.radio>
<x-form.checkbox name='terms' value='1'>1</x-form.checkbox>
<x-form.checkbox name='terms' value='1'>{{ $terms }}</x-form.checkbox>
<x-form.select name='types' placeholder='Select'>
</x-form.select>
<x-form.select name='types'>
</x-form.select>
@php
$options = [1 => 'one', 2 => 'two', 3 => 'three'];
@endphp
<x-form.select name='types' placeholder='Select'>
@foreach($options as $key => $value)
<x-form.selectoption key='{{ $key }}' value='{{ $value }}'></x-form.selectoption>
@endforeach
</x-form.select>
<x-form.button name='submit'>Submit</x-form.button>
<x-form.button>Submit</x-form.button>
php
<x-form.open>
</x-form.open>
php
<x-form.open method='delete' action='delete-comment'>
</x-form.open>