src/Terranet/Contacts/Contacts.php
public function department($name, Closure $callback)
    {
        $department = $this->createDepartment($name);

        call_user_func($callback, $department);

        if (is_null(static::$departments)) {
            static::$departments = Collection::make([]);
        }

        static::$departments->push($department);

        return $this;
    }
public function department($name, Closure $callback)
    {
        $department = $this->createDepartment($name);

        call_user_func($callback, $department);

        if (is_null(static::$departments)) {
            static::$departments = Collection::make([]);
        }

        static::$departments->push($department);

        return $this;
    }
public function department ( $ name , Closure $ callback ) { $ department = $ this -> createDepartment ( $ name ) ; call_user_func ( $ callback , $ department ) ; if ( is_null ( static :: $ departments ) ) { static :: $ departments = Collection :: make ( [ ] ) ; } static :: $ departments -> push ( $ department ) ; return $ this ; }
Register new department

@param $name
@param Closure $callback
@return $this
Register new department