PHP code example of spindogs / laravel-spin-forms

1. Go to this page and download the library: Download spindogs/laravel-spin-forms 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/ */

    

spindogs / laravel-spin-forms example snippets


@stack('scripts')

return [
    'components' => [
        'form' => [
            'view'  => 'spin-forms::components.form', // DEFAULT
            'view'  => 'components.spin-forms.form', // OVERRIDE
            'class' => \Spindogs\LaravelSpinForms\View\Components\Form::class
        ],
    ]
]

$options = [
    'arsenal' => ['name' => 'Arsenal', 'image' => '/images/badge/arsenal.png'],
    'chelsea' => ['name' => 'Chelsea', 'image' => '/images/badge/chelsea.png'],
    'liverpool' => ['name' => 'Liverpool', 'image' => '/images/badge/liverpool.png'],
    'man-united' => ['name' => 'Manchester United', 'image' => '/images/badge/man-united.png']
];

$selected_singular = 'arsenal';

$selected_multiple = ['arsenal', 'liverpool'];
bash
php artisan view:clear
bash
php artisan vendor:publish --provider="Spindogs\LaravelSpinForms\SpinFormsServiceProvider"
blade
<x-form method="POST" :files="true">
</x-form>
blade
<x-form-date-picker label="Date Picker" name="date-picker" default="2020-12-01" />
blade
<x-form-date-time-picker label="Date/Time Picker" name="date-time-picker" default="2020-12-01 13:44" />
blade
<x-form-time-picker label="Time Picker" name="time-picker" value="12:34" />