PHP code example of bupkneb / multiselect-nova-filter

1. Go to this page and download the library: Download bupkneb/multiselect-nova-filter 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/ */

    

bupkneb / multiselect-nova-filter example snippets


use bupkneb\Filters\MultiselectFilter;

class DocumentOwner extends MultiselectFilter
{
  public function apply(Request $request, $query, $value)
  {
      return $query->whereIn('user', $value);
  }

  public function options(Request $request)
  {
      return [
          'Herald' => 'herald',
          'Kemar' => 'kemar',
      ];
  }
}