protected function option(Model $model, $key, $default = null)
    {
        if (! method_exists($model, 'searchableOptions')) {
            return $default;
        }

        $options = $model->searchableOptions() ?: [];

        return array_get($options, $key, $default);
    }
protected function option(Model $model, $key, $default = null)
    {
        if (! method_exists($model, 'searchableOptions')) {
            return $default;
        }

        $options = $model->searchableOptions() ?: [];

        return array_get($options, $key, $default);
    }
protected function option ( Model $ model , $ key , $ default = null ) { if ( ! method_exists ( $ model , 'searchableOptions' ) ) { return $ default ; } $ options = $ model -> searchableOptions ( ) ? : [ ] ; return array_get ( $ options , $ key , $ default ) ; }
Get the model specific option value or a default.

@param \Illuminate\Database\Eloquent\Model $model
@param string $key
@param mixed $default
@return mixed
Get the model specific option value or a default .