title: Flatten laravel relationship collection / array
body: <p>I am having problem with array convert
  I went use laravel collection using map Or php array</p>
  <pre>
  Array
  (
      [0] => Array
          (
              [id] => 3487
              [title_fa] => Father
              [code] => 01
              [father_id] => 0
              [webmaster_id] => 8
              [grandchildren] => Array
                  (
                      [id] => 3488
                      [title_fa] => Child 1
                      [code] => 02
                      [father_id] => 3487
                      [grandchildren] => 
  
                  )
  
          )
       [1] => Array
          (
              [id] => 3489
              [title_fa] => Father 2
              [code] => 03
              [father_id] => 3488
              [grandchildren] => Array
                  (
                      [id] => 3490
                      [title_fa] => Child 2
                      [code] => 04
                      [father_id] => 3489
                      [grandchildren] => 
                  )
  
          )
  
  )
  </pre>
  <p>array convert to array</p>
  <pre>
  Array
  (
     [0] => Array
       (
              [title_fa] => Father
              [code] => 01
       )
     [1] => Array
       (
              [title_fa] => Father>Child1,
              [code] => 0102
       )
     [2] => Array
       (
              [title_fa] => Father2
              [code] => 03
       )
     [3] => Array
       (
              [title_fa] => Father2>Child2
              [code] => 0304
       )
  )
  </pre>
  <p>Illuminate\Support\Collection::filter()</p>
  <pre><code> public function filter(callable $callback = null)
  
  {
  
      if ($callback) {
  
          return new static(Arr::where($this-&gt;items, $callback));
  
      }
  
  
  
      return new static(array_filter($this-&gt;items));
  
  }
  </code></pre>