public function edit($content)
    {
        $users = [];
        foreach (User::all() as $user) {
            $users[$user->id] = $user->getName() . ' (#'.$user->id.')';
        }
        $this->_editViewData['customName'] = array_key_exists($content, $users) ? '' : $content;
        $this->_editViewData['selectOptions'] = [0 => '-- Custom User --'] + $users;
        $content = $this->_editViewData['customName'] ? 0 : ($content ?: Auth::user()->id);
        return parent::edit($content);
    }
public function edit($content)
    {
        $users = [];
        foreach (User::all() as $user) {
            $users[$user->id] = $user->getName() . ' (#'.$user->id.')';
        }
        $this->_editViewData['customName'] = array_key_exists($content, $users) ? '' : $content;
        $this->_editViewData['selectOptions'] = [0 => '-- Custom User --'] + $users;
        $content = $this->_editViewData['customName'] ? 0 : ($content ?: Auth::user()->id);
        return parent::edit($content);
    }
public function edit ( $ content ) { $ users = [ ] ; foreach ( User :: all ( ) as $ user ) { $ users [ $ user -> id ] = $ user -> getName ( ) . ' (#' . $ user -> id . ')' ; } $ this -> _editViewData [ 'customName' ] = array_key_exists ( $ content , $ users ) ? '' : $ content ; $ this -> _editViewData [ 'selectOptions' ] = [ 0 => '-- Custom User --' ] + $ users ; $ content = $ this -> _editViewData [ 'customName' ] ? 0 : ( $ content ? : Auth :: user ( ) -> id ) ; return parent :: edit ( $ content ) ; }
Display user select plus custom input
@param string $content
@return string
Display user select plus custom input