PHP code example of ministrare / laravel-core-package
1. Go to this page and download the library: Download ministrare/laravel-core-package 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/ */
ministrare / laravel-core-package example snippets
<?= Form::Input('checkbox', __('label'), 'slug', [
//Required
'options' => [
'value_checkbox_option_1' => '(string) label checkbox option 1',
'value_checkbox_option_2' => '(string) label checkbox option 2',
],
// optional
'class' => '(string) If set, sets the HTML property class with given value.',
'message' => '(string) If set, sets and show the error message.',
'value' => "(string) if set, sets the checkbox that matches the giving key value",
])->Render()
<?= Form::Input('email', __('label'), 'slug', [
// optional
'autocomplete' => '(boolean) If set, sets the HTML property autocomplete with the slug.',
'autofocus' => '(boolean) If set, sets the HTML property autofocus.',
'class' => '(string) If set, sets the HTML property class with given value.',
'icon' => '(string) If set, shows a font-awesome 4.7.0 icon instead of the label. example: "address-book" will result in "fa fa-address-book".',
'message' => '(string) If set, sets and show the error message.',
'placeholder' => '(string) If set, sets the HTML property placeholder with given value.',
'
<?= Form::Input('password', __('label'), 'slug', [
// optional
'autocomplete' => '(boolean) If set, sets the HTML property autocomplete with the slug.',
'autofocus' => '(boolean) If set, sets the HTML property autofocus.',
'class' => '(string) If set, sets the HTML property class with given value.',
'icon' => '(string) If set, shows a font-awesome 4.7.0 icon instead of the label. example: "address-book" will result in "fa fa-address-book".',
'message' => '(string) If set, sets and show the error message.',
'placeholder' => '(string) If set, sets the HTML property placeholder with given value.',
'
<?= Form::Input('radio', __('label'), 'slug', [
//Required
'options' => [
'value_radio_option_1' => '(string) label radio option 1',
'value_radio_option_2' => '(string) label radio option 2',
],
// optional
'class' => '(string) If set, sets the HTML property class with given value.',
'message' => '(string) If set, sets and show the error message.',
'value' => "(string) if set, sets the radio option that matches the giving key value",
])->Render()
<?= Form::Input('select', __('label'), 'slug', [
//Required
'options' => [
'value_radio_option_1' => '(string) label radio option 1',
'value_radio_option_2' => '(string) label radio option 2',
],
// optional
'class' => '(string) If set, sets the HTML property class with given value.',
'emptyFirst' => "(string) If set, places a empty option in front of the options to display e empty field on load",
'message' => '(string) If set, sets and show the error message.',
'multiple' => '(boolean) if set, allows the user to select multiple options.',
'value' => "(mixed) if set with value_radio_option, will select this option on load. For multiple select, array value allowed."
])->Render()
<?= Form::Input('string', __('label'), 'slug', [
// optional
'autocomplete' => '(boolean) If set, sets the HTML property autocomplete with the slug.',
'autofocus' => '(boolean) If set, sets the HTML property autofocus.',
'class' => '(string) If set, sets the HTML property class with given value.',
'icon' => '(string) If set, shows a font-awesome 4.7.0 icon instead of the label. example: "address-book" will result in "fa fa-address-book".',
'message' => '(string) If set, sets and show the error message.',
'placeholder' => '(string) If set, sets the HTML property placeholder with given value.',
'
<?= Form::Input('textarea', __('label'), 'slug', [
// optional
'class' => '(string) If set, sets the HTML property class with given value.',
'rows' => "(integer) If set, sets the HTML property rows with given value",
'value' => '(mixed) If set, sets the textarea with given value',
])->Render()