PHP code example of nf / input
1. Go to this page and download the library: Download nf/input 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/ */
nf / input example snippets
'providers' => [
// .... Others providers
\NightFury\ExtensionKit\ExtensionKitServiceProvider::class,
],
use use NightFury\Option\Abstracts\Input;
\NightFury\Option\Facades\ThemeOptionManager::add([
'name' => 'Exetension Kit',
'fields' => [
[
'label' => 'Text',
'name' => 'theme_option_text',
'type' => Input::TEXT,
' 'type' => Input::EMAIL,
'ame' => 'theme_option_gallery_with_meta',
'type' => Input::GALLERY,
'description' => 'Gallery with meta field, for now we support text and textarea on meta field.',
'meta' => [
[
'label' => 'Text',
'name' => 'meta_text',
'type' => Input::TEXT,
],
[
'label' => 'Textarea',
'name' => 'meta_textarea',
'type' => Input::TEXTAREA,
],
],
], [
'label' => 'Image',
'name' => 'theme_option_image',
'type' => Input::IMAGE,
'description' => 'Choose your image by clicking the button bellow',
],
[
'label' => 'Select',
'name' => 'theme_option_select',
'type' => Input::SELECT,
'options' => [
[
'value' => 'first',
'label' => 'First Value',
'selected' => true,
],
[
'value' => 'second',
'label' => 'Second Value',
'selected' => false,
],
],
],
],
]);
echo NightFury\ExtensionKit\Facades\View::render('example', ['data' => 'some test data here']);