hussein4's avatar

Pagination render() error

i am trying a simplePaginate in L 5.1 but receive error ErrorException in Builder.php line 2071: Call to undefined method Illuminate\Database\Query\Builder::render()

in my POController

 public function index()
    {
     
     $po =PO::orderBy('created_at', 'desc')->simplePaginate(10);
 return view ('pos.index', compact('po' ));
    }

in my pos/index.blade.php


 @foreach($po as $po)
                                    <tbody>
                                    <tr>
                                <td><a href=" {{ action('POsController@show', [$po->id])  }} " > {{ $po->po_no }} </a></td>
                                        <td>{{ $po->po_subject }}</td>
                                        <td>{{ $po->po_issued }}</td>
                                        <td>{{ $po->created_at }}</td>
                                    </tr>
                                    </tbody>
                            @endforeach
                            </table>
                        </po>
                    </div>
                </div>
          
    {!! $po->render() !!}

i receive error
ErrorException in Builder.php line 2071: Call to undefined method Illuminate\Database\Query\Builder::render()

0 likes
2 replies

Please or to participate in this conversation.