PHP code example of skywalker-labs / formcraft

1. Go to this page and download the library: Download skywalker-labs/formcraft 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/ */

    

skywalker-labs / formcraft example snippets


{!! Form::open(['url' => 'users/store']) !!}
    {!! Form::text('name') !!}
    {!! Form::email('email') !!}
    {!! Form::submit('Save') !!}
{!! Form::close() !!}

{!! Form::model($user, ['route' => ['users.update', $user]]) !!}
    {!! Form::text('name') !!}
    {!! Form::email('email') !!}
    {!! Form::submit('Update') !!}
{!! Form::close() !!}

{!! Form::rules(''

// Toggle switch
{!! Form::toggle('notifications', 1, true, ['label' => 'Enable']) !!}

// Color picker
{!! Form::colorPicker('theme_color', '#3490dc') !!}

// Searchable select
{!! Form::searchableSelect('country', $countries) !!}

// Date picker
{!! Form::datePicker('birthday') !!}

// File upload with preview
{!! Form::fileUpload('avatar', ['preview' => true]) !!}

{!! Form::wire('email')->text('email') !!}
{!! Form::wireLive('search', 300)->text('search') !!}
{!! Form::wireClick('save')->submit('Save') !!}

{!! Html::alert('Success!', 'success') !!}
{!! Html::progressBar(75, ['striped' => true]) !!}
{!! Html::badge('New', 'primary') !!}
{!! Html::tabs(['Tab 1' => 'Content 1', 'Tab 2' => 'Content 2']) !!}
bash
php artisan vendor:publish --tag=html-config