src/Press/Models/Category.php
public function getAllCategories()
    {
        $categories = $this->exists ? self::whereNotIn('id', [$this->id])->get() : self::get();

        return $categories->mapWithKeys(function ($item) {
            return [$item->id => $item->term->GetContent('name')];
        })->toArray();
    }
public function getAllCategories()
    {
        $categories = $this->exists ? self::whereNotIn('id', [$this->id])->get() : self::get();

        return $categories->mapWithKeys(function ($item) {
            return [$item->id => $item->term->GetContent('name')];
        })->toArray();
    }
public function getAllCategories ( ) { $ categories = $ this -> exists ? self :: whereNotIn ( 'id' , [ $ this -> id ] ) -> get ( ) : self :: get ( ) ; return $ categories -> mapWithKeys ( function ( $ item ) { return [ $ item -> id => $ item -> term -> GetContent ( 'name' ) ] ; } ) -> toArray ( ) ; }
Select all categories, except current.

@return array
Select all categories except current .