PHP code example of binarycabin / options

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

    

binarycabin / options example snippets

$xslt
php artisan make:option CLASSNAME
$xslt
php artisan make:option County

public function getArray(){
  return [
    'US' => 'United States of America',
    'CA' => 'Canada',
  ];
}

foreach(\App\Options\County::get('---') as $optionKey => $optionValue)
{
  echo '<option value="{{ $optionKey }}">{{ $optionValue }}</option>'
}