Yab\Quarx\Repositories\WidgetRepository::paginated PHP Method

paginated() public method

public paginated ( )
    public function paginated()
    {
        return Widget::orderBy('created_at', 'desc')->paginate(25);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Display a listing of the Widgets.
  *
  * @return Response
  */
 public function index()
 {
     $result = $this->widgetsRepository->paginated();
     return view('quarx::modules.widgets.index')->with('widgets', $result)->with('pagination', $result->render());
 }